How to clean a hard drive before reinstall

if you do a fresh install, and you select "Use the entire disk" (the most common, and most used option) assuming that you are not needing to dual boot. The installer will automatically delete all the previous partitions, and repartition it as needed. If you are using the latest stable version of Ubuntu, it will format it to Ext4.

You really don't have to dig into any disk utilities unless you really want to, as they will just complicate things or make more work for you. Just let the installer do what it needs to do and it will be fine.


If you refer to a fresh reinstall, when reinstalling you will find several options for the usage of your hard disk drive, which includes but not limits to:

"Side by Side" install, which will install your new OS sharing the hard disk drive but without losing your current installation. This way, GRUB will be updated or installed as required.

"Use the entire disk" which will physically erase the whole disk in order to use all its space for the new OS install.

If what you wish is to use the hard disk drive for a data tasks such as BackUp or other data handling, you can achieve that by first erasing the whole partition and do it from scratch. Formatting the disk will also do the trick.

Several tools will help you to achieve this task in Linux and other OS's.

In Maverick, under "system/administration" you will find a "Disk Utility", inside of which you will find a disk drive and other devices tree on the left and its characteristics and tool list in the right side, where you can find both "Delete Partition" and "Format Drive" options.

You can do this from a Live Session.

A screenshot is placed here for your convenience. enter image description here


If you boot a live cd (any distro) you can use: dd if=/dev/zero of=/dev/sda This assumes that your disk is the first SATA disk and will write the while disk with 0's, this will take some time. You could alternatively use /dev/urandom instead of /dev/zero to fill it with random data.