0

I'd like to sell my old pc (writing this on it) that has ubuntu 16.04 LTS. The guy who I am selling this to is my brother. He doesn't want the hdd to have ubuntu on it. So I'd like to know how do I delete all files and ubuntu too from this drive. It is the only drive on this PC. So basically the hdd would be in it's original state.

JoVa
  • 5

1 Answers1

1

The harddisk cannot be deleted while ubuntu is running from it, so you will have to boot a Live CD from a CD or flashdrive.

Method 1: Terminal

You can use a dd comand:

  1. Boot into the Live CD

  2. Check the partitions with fdisk -l

  3. Run dd if=/dev/zero of=/dev/sda (assuming that /dev/sda is your HDD)

Method 2: GUI only

Here we will use gParted:

  1. Boot into the Live CD
  2. Run gParted from live CD. It should come with the Live CD, but in case it does not, run: apt-get update && apt-get install gparted
  3. Delete all partitions on your HDD (not the medium you are booting the Live CD from).
  4. Click the green "Apply All Operations" check-mark.
Potaito
  • 568
fugitive
  • 1,356
  • 8
  • 14