I have so many old disks that I need to wipe out their data. I think the best choice is Department of Defense (DoD) by running Darik’s Boot and Nuke live CD or USB, but the live CD/USB occupies a PC for such a long time to wipe disk. There are some other ways to wipe disk on Ubuntu. I want to show how to wipe disk on Ubuntu here today.
Wipe command; wipe command can fully erase data from a disk. I have an old 60GB IDE HDD. Here is how to do it.
Installation:
sudo apt install wipe
At first, my HDD has two partitions so I delete the partition by using gparted. My HDD is mounts on /dev/sdb. Run wipe command below to wipe the HDD.
sudo time wipe -q /dev/sdb
Type “Yes”, it will take about 2 and half hours. I think wipe is slow. When I ran wipe to erase 1TB SSD before. It took me about 2 ~ 3 days. I could not wait for that long. So, I used shread command instead of wipe. Ubuntu shread command took about 3~4 hours to erase the 1TB SSD. There is another way to erase a disk on Ubuntu. It is dd command. When I used dd command to erase the 1TB SSD, it took about 2 hours to erase the 1TB SSD.
Wipe command completed to erase the disk for about tow hours and 45 minutes. I now try shread command.
sudo time shred -vfz /dev/sdb
Shred starts.
It took about two hours and fourteen minutes. Shred was little faster than wipe.
Next, I try dd command. Please make sure that the target HDD is not mounted.
sudo umount /dev/sdb
You should get the response above. Now, run the dd command below. This command write random numbers over the target disk. If you want to write zeros, use the command option “if=/dev/zero”.
sudo time dd if=/dev/urandom of=/dev/sdb bs=10M
The dd command took about 35 minutes to erase my 60GB HDD. It was a lot faster than shred and wipe.
You will get an error, “”, This message means that the dd command completes writing to a disk while wiping the disk by writing zero or random data.