title: ATA Secure Erase tags: erase ssd ata secure-erase ## Erasing an SSD These steps must be performed as ```root```, where ```$device``` is your device, e.g. ```/dev/sda``` 1. ```hdparm -I $device``` and check device: 1. not frozen 1. if frozen, suspend/sleep and then wake (if running ubuntu live cd, make a note of the username, e.g. ubuntu-studio, before this so that you can unlock) 1. supports enhanced erase 1. Set user password: ```hdparm --user-master u --security-set-pass MrFlibble $device``` 1. Security erase: ```hdparm --user-master u --security-erase MrFlibble $device``` 1. Check drive status ```hdparm -I $device```, should be ```not locked``` (Summarised from https://www.thomas-krenn.com/en/wiki/SSD_Secure_Erase)