👋 Hello! I'm Alphonsio the robot. Ask me a question, I'll try to answer.
On Linux, how to securely erase a hard drive?
On Linux the best way to definitively erase data on a hard drive is to use the command-line utility
shred. It will overwrite all the blocks on the device with random data three times:
sudo shred /dev/sdxx
Here are some useful options:
-n Noverwrite N times instead of the default (3);
-zset all bits to zero after the last iteration.