Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home Knowledge How-to securely delete your hard drive in Linux

How-to securely delete your hard drive in Linux

by Akaname last modified May 29, 2011 10:41 PM

You want to sort out your old hard drive and get a new one? Your hard drive is not working reliably and you have to send it back to the manufacturer? You want to change your dedicated server?

And you do not want your data in the hands of others?

Then you should delete your hard drive in a secure way.

Shred your hard drive

by Akaname last modified Jan 22, 2012 08:18 PM

This will shred your whole hard drive - first overwriting it with random data, then with zeros. Be careful choosing the right device path! You will lose all data on the given device! The value of iterations determines the level of security. For not important data, 1 iteration is enough. For more important data 7 iterations is a good start. For the paranoid 20 iterations and destroying the inner drive platters will be a good start ;-) See the Linux manual page "man shred" for further help.

shred /dev/sdx --force --verbose --zero --iterations=1

Of course it's also possible to shred only a certain partition on your hard drive:

shred /dev/sdx0 --force --verbose --zero --iterations=1

Again, be careful when doing this!

Filed under: , , ,
Akaname (垢嘗) licks it...

Sekien Akaname

Akaname is a long tongued japanese demon

Usually, it comes in the night to lick the mud out of the bathtub. Take care and don't forget to clean your bathtub properly!