Retire a machine
Remove a retired machine’s recipient key from the vault that stays, then retire its sealed unlock credential and, if
nothing else needs it, its TPM. forget-machine only checks and prints the steps; you run them yourself.
Old copies of identity.age and backups still open with a removed key: if the machine was lost, rotate the
provider credentials it could reach (step 4).
Run every iron-vault command through sudo (see sudo in a protected
installation).
Prerequisites
- The vault that stays, running and Ready, on another machine. Don’t run the commands on the retired machine.
- The retired machine’s recipient key, the
age1…text. For a machine with TPM unlock it is thehost-unlockline ofiron-vault recipient list, or what the provisioning script printed. If the machine’s vault was moved withexportandimport, the new vault never held the old key; use the one the old machine’srecipient listor provisioning output showed. - Your approval passphrase, if the key is still a recipient (step 1).
Steps
1. Remove the recipient, if it is still one
iron-vault recipient list
iron-vault recipient remove age1…
recipient remove asks for the approval passphrase; see manage recipients.
2. Check that it is gone
iron-vault forget-machine age1…
If the key is gone, it prints three facts and then the steps for the retired machine:
age1… is not a recipient of this vault. Check that it is the key the retired machine had: this command cannot tell a removed key from one that was never enrolled.
independence rule: holds
recovery last checked: 2026-11-04 (7 days ago)
A mistyped key also reads as gone, so compare the key it repeats with the one on the retired machine.
Fix any warning (printed first, on stderr) before you clear any TPM:
the recovery check is overdue,has never runoris not on record. Runrecovery checkwith your offline recovery key.the vault no longer meets the independence rule. Add the missingoperationalorrecoveryrecipient withrecipient add.
3. Follow the steps it prints, on the retired machine
Steps 1 to 3 run as root on the retired machine. In order:
- Find out what else uses the TPM. Clearing it destroys every key it holds. List the TPM keyslots of each LUKS
device with
systemd-cryptenroll DEVICE; look for other sealed credentials withgrep -rlE 'LoadCredentialEncrypted|SetCredentialEncrypted|ImportCredential' /etc/systemd /run/systemd /usr/lib/systemdandls /etc/credstore.encrypted /run/credstore.encrypted /usr/lib/credstore.encrypted /usr/local/lib/credstore.encrypted; list the persistent handles withtpm2_getcap handles-persistent. The handle0x81000001is systemd’s storage root key, shared by everysystemd-credsuser on the machine. List the NV indices withtpm2_getcap handles-nv-index: clearing the TPM destroys them, and other software keeps state there (the systemd-pcrlock policy, which LUKS keyslots enrolled with--tpm2-pcrlockdepend on, andtpm2-totp). Also ask the machine’s other users, and check for other software that keeps keys in the TPM. - Delete the sealed credential.
systemctl stop iron-vault-host-unlock.service, thenrm /etc/iron-vault-host/host-unlock.cred. A copy of that file in a backup still opens on this TPM. - Clear the TPM only if nothing else needs it and the recovery path is verified. Use the firmware’s clear-TPM setting, or
tpm2_clear. If step 1 found another user, leave the TPM alone: step 2 has retired the machine from this vault, and only old backup copies stay reachable through this TPM. Do not clear a shared TPM.
If the machine held only an added or recovery key, there is no TPM step: delete that key where it was kept.
The machine may also still hold its own copy of the vault. Retire it with iron-vault reset or by
purging the package, and delete /etc/iron-vault-host/provisioning.txt beside the sealed credential.
4. If the machine was lost or stolen, rotate
On the vault that stays, for each credential in iron-vault list, have the provider reissue the key, then give the
name and the origins list shows:
iron-vault replace NAME --origin openexchangerates.org
See rotate a key.
What can go wrong
machine-not-forgotten. The key is still a recipient. Runrecipient removewith the same key. If that is refused because the key is the host unlock identity this service holds, you ran the command on the machine being retired; run it on the vault that stays.wrong-state. The service is not Ready. Runiron-vault unlock.recipient-invalid. The argument is not anage1…key.busy. Another operation holds the service-wide lock; try again.recipient-inventory-damaged. The recipient inventory is missing or damaged; nothing was changed. See errors.
Reference
- CLI and errors.
- Audit log:
recipient.forget-checked. - Forget machine design: what it checks, and why it runs on the vault that stays.
- Related: manage recipients, reset the vault, unlock at boot with a TPM.