Securely erase an SSD with hdparm

SSD drives need different way of erasing data. We will cover how to do this on Linux without proprietary software.

# show drive Infos and lock for "frozen" state!!! shoud be not frozen/locked
hdparm -I /dev/sdb
 
# if frozen, try the following:
systemctl suspend
# then, unsuspend. It should be "not frozen" after that
 
# now, erase the data
hdparm --security-set-pass NULL /dev/sdb # set the "NULL" password to UNLOCK the Controller
hdparm --security-erase NULL /dev/sda # run secure erase!

Source: https://www.linuxonlinehelp.eu/ubuntu-debian-samsung-ssd-secure-erase-with-linux/