Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

Wipe your Computer

20190908 The scenario that often requires the complete wiping of a computer is when that computer is being sold or handed on to someone else, or otherwise being disposed of. It is important to back up the contents of the hard disk, if there is any material that is to be retained.

The process begins by acquiring a Ubuntu ISO image and writing it to USB. Details of setting up a USB to boot the ISO image are available from Ubuntu.

Next, boot the computer from the USB drive. To do this you will need to plug the USB into the computer, turn the computer on and select to go into the Boot Menu, often by pressing F12. Choose the USB HDD to boot from and then select Try Ubuntu without installing.

Once Ubuntu is running connect to the network (WiFi or Ethernet). From the desktop open a terminal from Activities, and type Terminal.

Update the repository information and then install the wipe command:

$ sudo apt-get install wipe

If the wipe package can not be installed in this way then download and install it from one of the mirrors like https://mirrors.edge.kernel.org/ubuntu/pool/universe/w/wipe/:

$ wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/w/wipe/wipe_0.24-4_amd64.deb
$ sudo dpkg -i wipe_0.24-4_amd64.deb

Now run the fdisk command to list the available disks and partitions.

$ sudo fdisk -l

Identify the Linux filesystem partition. Perhaps /dev/sda6. For a quick wipe use option -q to write random data just 4 times over each file.

$ sudo wipe -kq /dev/sda6
Okay to WIPE 1 special file ? (Yes/No) yes
Wiping /dev/sda6, pass 0 in quick mode   [   39110 /  5883392]  ETA 12h26m
This will take some time on this 90GB partition.

The default wipe takes even longer:

$ sudo wipe /dev/sda6
Okay to WIPE 1 special file ? (Yes/No) yes
Wiping /dev/sda6, pass 0 (0 )   [   39110 /  5883392]  ETA 4d 11h

The wipe command and other similar commands do not guarantee data can not be recovered. There is various technology and backdoors that are likely to be able to recover data. To ensure privacy it is best to work with encrypted files and file systems.

Copyright © 1995-2020 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware and the author of open source software including Rattle and wajig.
Also the author of Data Mining with Rattle and Essentials of Data Science.