How to Add more Keys to your LUKS-encrypted Volume and Delete Forgotten Slots

Dump Information about key slots

cryptsetup luksDump /path/to/volume-or-partition

As far as I can see, each passphrase is tied to one key is tied to one slot, so adding a passphrase always means adding another key in a new slot, and vice versa.

Adding a new key

cryptsetup luksAddKey /path/to/volume-or-partition

will ask for an existing passphrase, then a new passphrase for the added slot.

Or a key file:

cryptsetup luksAddKey /path/to/volume-or-partition /path/to/key-file

Delete key slot by associated passphrase

This method also works while the device is open.

Simply enter the passphrase you wish to be deleted.

cryptsetup luksRemoveKey /path/to/volume-or-partition

Afterwards, there is one less keyslot.

Find out which passphrase/keyfile opens which slot

cryptsetup --verbose open /path/to/volume-or-partition identifier
Key slot X unlocked.
Command successful.

Delete slots without knowing the passphrase

To identify the slots you don’t need anymore, repeat the previous for all passphrases you want to continue using. for each stale slot number $N, do this:

cryptsetup --verbose luksKillSlot /path/to/volume-or-partition $N