Wipe partition table / MBR from a drive

By | 2010/06/22

How do I wipe the partition table from a hard drive?

This command will wipe the partition table and master boot record. Warning! Backup any and all data first!

dd if=/dev/zero of=/dev/sdX bs=512 count=1

Where /dev/sdX is the location of the drive you wish to wipe.
For instance, if the drive is /dev/sda, change that to /dev/sda

The output will look something like this:

stmiller@brahms:~$ sudo dd if=/dev/zero of=/dev/sdf bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0105726 s, 48.4 kB/s