Securely Wipe Hard Drive in Linux

By | 2011/07/03

To wipe a hard disk down to zeros, use the dd command.

$ sudo dd if=/dev/zero of=/dev/sdX bs=1M

Where /dev/sdX is the drive you want to zero out. Be extremely careful – there is no undo!

For example, this zeros out the specific disk “/dev/sdf” on my system:

stmiller@brahms:~$ sudo dd if=/dev/zero of=/dev/sdf bs=1M

This can take a LONG time, and also use a fair amount of CPU.

Yay!