Interview Prep/Linux/Security, hardening and incident response

How would you securely wipe a decommissioned server's disks?

IntermediateScenarioSecurity, hardening and incident response
Answer

Situation read → Depends on media and encryption.

What I'd do →

  1. If disks were LUKS-encrypted: destroy the key slots: cryptsetup luksErase /dev/sdb (crypto-erase).
  2. SSD/NVMe: use the drive's secure erase: nvme format /dev/nvme0n1 --ses=1 or blkdiscard --secure where supported.
  3. HDD: shred -n 1 -z /dev/sdb or dd if=/dev/zero.
  4. Document serial numbers and the method for audit.

Why → Overwriting doesn't reliably reach all SSD cells because of wear levelling; crypto-erase or firmware erase does.

Interview tip → Cloud volumes are crypto-erased by the provider when deleted.

All Linux questions Roadmap: Linux

More on Security, hardening and incident response