It is important to understand that deleting a file from a hard drive does not delete the data but only its reference on the disk. To make sure that the data associated with a file cannot be recovered, one needs to write random data in place of the old file.
This is the same with hard drives. Moreover, formating a hard drive does not mean that the data that used to be on the disk cannot be recovered.
To make sure that the data is not recoverable, we will use a tool called shred. This will write random bits 3 times over all the blocks available. To do so, you will need to get a Linux Live CD (I have downloaded a version of Ubuntu). Then:
sudo su //become root on Ubuntu Live CD
You then have to find the partition you want to format with:
You then have to type:
shred -vfz -n 10 [partition]
- -v: show progress
- -f: change permissions to allow writing if necessary
- -z: add a final overwrite with zeros to hide shredding
I have taken most of the information from howtoforge.com.