Secure deletion on Ubuntu

Soldato
Joined
18 Oct 2002
Posts
12,745
Hi There,

I'm just installing the latest Ubuntu on a PC that I am about to sell and realised I didn't make use of CCleaner in windows to securely erase the hard drives first.

I've just made the drives into a new RAID 5 array, and I believe they will have been formatted as part of the Ubuntu install.

Can anyone recommend a decent secure deletion command/file/application for ubuntu that is free, and importantly, idiot proof for me?
 
Oops sorry misread the post.

To wipe the drive, use dd with a randomized input.

dd if=/dev/urandom of=/dev/sdX bs=1024

sdX is the drive/partition you want to erase, you can find it with 'sudo fdisk -l', don't get the wrong drive :)
 
Last edited:
sudo dd if=/dev/zero of=/zerofile; sudo rm /zerofile

That will zerofill the free space on the drive then remove the file, no data lost so don't worry ;)
 
Sorry for the confusion, my poor posting style I'm sure.

I'll be clearer !

I want an easy way to ensure that the drives I'm selling have _NONE_ of my data on, and that the files CANT be recovered(easily/by an average joe/up to a point of the Americans getting an electron microscope on the drive looking for voltage fluctuations on the platter surface)

... ok the last example is a joke, but seriously, I don't want the details of my rare my little pony collection getting out.
 
Assuming you are selling the drive, and you don't want any data in it, then the second answer was the correct answer.

The easiest, and safest way for a novice to do this, is to disconnect all drives they don't want to nuke, and book a live distro, generally gnoppix. You neither need to disconnect your drives or use a live CD, this is just to project you from typing in the wrong drive letter.

tntcoder said:
dd if=/dev/urandom of=/dev/sdX bs=1024

X will need to be changed, as advised.
 
so based on that, is my best option to boot in with a live cd (can ubuntu do this?) and then do the deletion, and THEN install a new OS on the array ?
 
so based on that, is my best option to boot in with a live cd (can ubuntu do this?) and then do the deletion, and THEN install a new OS on the array ?

Pretty much any linux distro can do this. You don't need to install anything on the new disks, as long as they're plugged in your operating system should be aware of them, and you'll be able to wipe them from the live cd itself.

If you're attempting to sell the entire PC (with a raid5 setup) the wipe freespace. Boot into ubuntu and run the command as suggested by bigsy.
 
dban boot and nuke will do it just use that then reinstall ubunutu.

no1 below millitary would even come close to getting data off the drive. Also the cost would be enormous
 
Back
Top Bottom