How-to securely delete your hard drive in Linux
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
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!
