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.


One thought on “Securely Wipe Hard Drive in Linux

  1. Harris

    There’s also the ‘shred’ command thats built-in on most distros(AFAIK). I’ve booted up a live usb and am doing this now..


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.