consider offering option to remove LUKS-encrypted partition
Note to self
Just in case we would like to add that feature, here's how it would work:
# blkid
/dev/sda2: UUID="d33fec62-6230-43b0-9ec5-7d5abeb1b918" TYPE="crypto_LUKS"
/dev/mapper/cryptroot: UUID="fae9323a-d9a8-4deb-8c63-0d967c75091e" TYPE="ext4"
# cryptsetup luksRemoveKey /dev/sda2
Enter LUKS passphrase to be deleted:
WARNING!
========
This is the last keyslot. Device will become unusable after purging this key.
Are you sure? (Type uppercase yes): YES
# cryptsetup remove /dev/mapper/cryptroot /dev/sda2
The partition needs to contain a fs, or else the last command will not work and it cannot really be removed. source