Completely destroying all data on a Hard Drive

A few days ago while clearing through some old boxes of computer equipment I discovered an old hard drive. This drive had been removed from an old computer that had been disposed of. At the time of disposal I copied all information from the old computer its replacement and kept the old hard drive as a backup in case something went wrong.

Now more than five years later I no longer need the backup and want to dispose of the physical hard drive. But first, I want to ensure that the drive is completely clear of the old data. Connecting the drive to my current computer it can still mount and read the old drive and I can see all the old files on it. It’s good that the backup has lasted this long but to completely wipe the drive of all this old personal data is a little more complex than just selecting all the contents and pressing the delete button or doing a reformat under Windows.

Completely destroying all data on the drive is important. If the drive is not completely wiped (that is every single physical sector on the drive is written over) it is possible that someone using a few pieces of software could bring the old data back from the dead.

To completely nuke the drive I could pay for commercial software or take a hammer to the physical drive. But there is a free way to nuke the drive by using Ubuntu Linux and it’s quite simple to do:

  1. Boot Ubuntu (running from a live CD/USB should work too)
  2. Find the full device path of the drive you want to destroy by running at a terminal:
    sudo gparted

    If you don’t have gparted installed, then install it using

    sudo apt-get install gparted

    Then on the right hand side of the GUI window select from the drop down list of hard drives and check the partitions of each one to confirm the path of the device that you want to nuke is. For instance:

    /dev/sdN
  3. Shred the drive using the following command, replacing the path with the path you found in step 2.
    sudo shred –vzn 1 /dev/sdN

    This command will take a while to run. It will go over the entire drive writing random data into every single physical sector of the drive and then a second time writing zero into every single sector.

Once the command has finished your drive will be completely wiped. It can now be reformatted and reused without any worry about someone being able to resurrect the previously deleted data.