[Unix/Linux] How to secure erase HDD/SSD with shred (English)

Sometimes you need to destroy or wipe data from hard drives (for example, before you sell your old hard drives on eBay) so that nobody else can access them.

Simply deleting data (e.g. with rm) is not enough because that just removes the file system pointer, but not the data, so it can easily be undeleted with recovery software.

Even zero’ing out your hard drive might not be enough.

Here’s where shred comes into play – shred can overwrite the files and partitions repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.

I do not issue any guarantee that this will work for you!

Maybe you need to install the tools for it:

apt install coreutils

After the install we can erase our disk

shred -vfz -n 10 /dev/sda

-v: show progress

-f: change permissions to allow writing if necessary

-z: add a final overwrite with zeros to hide shredding

-n: overwrite N times instead of the default (3)


and after a while … you are done 🙂

Source: www.howtoforge.com