Secure Erase User Guide for LinuxThis guide will walk you through securely erasing your Kingston SSD using Linux tools
SATA Secure Erase ProcedureWarningPlease make sure to have a full backup of any important data before you proceed!
Prerequisites• You must have root privileges.
• You must have your SSD connected to the system as a secondary (non-OS) drive.
• You must have lsscsi and hdparm installed. You may need to install them with your distribution’s package manager.
• Your drive must not be in a security freeze.
• Your drive must not be password protected.
Instructions1. Find the device name (/dev/sdX) of the drive you wish to erase:
# lsscsi
2. Make sure drive security is not frozen:
# hdparm -I /dev/sdX | grep frozen
If the output shows "frozen" (instead of "not frozen") then you cannot continue to the next step. You must try to remove the security freeze by trying one of the following methods:
Method 1: Put the system to sleep (suspend to RAM) and wake it up. On most distributions the command to suspend is:
# systemctl suspend
Now issue the hdparm command again. If it worked the output will show “not frozen” (instead of “frozen”).
Method 2: Hot plug the drive. This is done by physically unplugging the SATA power cable from the drive and plugging it back in while the system is powered on. You may need to enable hot plug in BIOS. Not all systems support hot plug.
Now issue the hdparm command again. If it worked the output will show “not frozen” (instead of “frozen”).
3. Set a user password on the drive. The password can be anything. Here we are setting the password to “p”:
# hdparm --security-set-pass p /dev/sdX
4. Issue the secure erase command to the drive using the same password:
# hdparm --security-erase p /dev/sdX
This command may take a few minutes to complete. The drive password is removed upon successful completion.
If the secure erase is interrupted or otherwise fails your drive may become security locked. In this case you can remove the security lock using the command below and then try the secure erase procedure again:
# hdparm --security-disable p /dev/sdX
SATA Secure Erase Example
NVMe Secure Erase ProcedureWarningPlease make sure to have a full backup of any important data before you proceed!
Prerequisites• You must have root privileges.
• You must have your SSD connected to the system as a secondary (non-OS) drive.
• You must have nvme-cli installed. You may need to install it with your distribution’s package manager.
• Your drive must not be password protected.
Instructions1. Find the device name (/dev/nvmeXn1) of the drive you wish to erase:
# nvme list
2. Issue the format command to the drive. Here we set the secure erase setting to 1 which indicates a user data erase:
# nvme format /dev/nvmeXn1 --ses=1
This command may take a few minutes to complete.
NVMe Secure Erase Example

FAQ: KSM-SE-LIX