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.
Asked
Active
Viewed 2,493 times
1 Answers
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:
Boot into the Live CD
Check the partitions with
fdisk -lRun
dd if=/dev/zero of=/dev/sda(assuming that/dev/sdais your HDD)
Method 2: GUI only
Here we will use gParted:
- Boot into the Live CD
- Run
gPartedfrom live CD. It should come with the Live CD, but in case it does not, run:apt-get update && apt-get install gparted - Delete all partitions on your HDD (not the medium you are booting the Live CD from).
- Click the green "Apply All Operations" check-mark.