1

I want to sell my ubuntu laptop which I use mostly for surfing the web. I want to make it difficult to recover all the data which I deleted from the laptop. I heard that we can do this by overwriting the free space on the hard drive with some data like zeros.

I have seen a few methods like sfill on this forum and elsewhere, which ask me to run a bunch of commands. But none of the answers are easy to understand or have step by step instructions. Some of them ask you to find out the mount point and other technical stuff, just to do a simple erase. I don't have the time to master linux, just so that I can do such a simple thing. I was able to erase my windows laptop easily and the tool even showed me the status which sfill does not even do.

So, please tell me how I can wipe the free space on my hard drive easily and quickly. Please provide step by step instructions starting from how to install the erasing tool, how to run it, which options to choose for a quick and basic erase (i.e. not military grade).

Thank you!

MasterJoe
  • 113
  • I would probably use dban (single-pass) to wipe the disk, then re-install a Ubuntu system on it. Even if you leave your installed Ubuntu on it; if you've used it, a quantity of data will exist in used portions of the disk (not just free space). FYI: this is a forum, (https://ubuntuforums.org/ is the Ubuntu Forums site) but a Q&A site and fyi: the windows tools are usually pretty easy to reverse... I for practice reverse people's "erasures" (data recovery practice) and I'm not a technician.. so be careful... – guiverc Mar 08 '21 at 03:21
  • https://superuser.com/questions/19326/how-to-wipe-free-disk-space-in-linux See the answer using BleachBit. – C.S.Cameron Mar 08 '21 at 04:56

1 Answers1

0

(Since you've specified that the laptop has a hard drive, I'll give instructions for that here, but in case you actually have an SSD, you'll want to follow the Memory Cell Clearing instructions on the Arch Wiki, which are a little more involved but work on Ubuntu and are much faster.)

As @guiverc suggested, DBAN is a good option here, but there's a more convenient way to use it, since you'll be reinstalling Ubuntu anyway. First, make a bootable Ubuntu USB stick like you normally would for an Ubuntu install. Boot into a live system from the USB stick (as Ubuntu can't erase your hard drive if it's running off it).

Open a terminal on the live system, and install nwipe (which is DBAN packaged for Linux):

$ sudo add-apt-repository universe
$ sudo apt install nwipe

Next, determine the device name of your hard drive. The easiest way to do this is by running the Disks tool included with Ubuntu. Select your hard drive, and it will show a device path like /dev/sda in the title bar. (Here's an example screenshot; you want the name without a number.) Once you have this path, run nwipe in your terminal (replacing /dev/sda with your drive's device path, if it's different):

$ sudo nwipe /dev/sda

nwipe has a number of different presets, the default being overwriting with three passes of random data and one of zeros. (You can choose more or fewer passes depending on how much time you have.) Press Shift+S to get it started, and then let it run — it can take 1–12 hours, depending on the size and speed of the drive. (A 1TB drive generally takes closer to 12 on the default setting.)

Once it's done, you'll need to reinstall Ubuntu. (If you're selling or giving away the laptop, you might find the OEM install mode useful.)