2

This question already has an answer here:

Can the Ubuntu 16.04 Operating System be removed / emptied from my computer? Help me to solve this, I want to restore my computer like a new situation, which is without an operating system.

marked as duplicate by karel, Melebius, guiverc, user535733, pomsky Nov 13 '18 at 14:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Yes. You need boot using for example Ubuntu Live CD or Live USB and format your device where Ubuntu OS is installed.

For example you have one HDD\SSD where current Ubuntu OS installed. When you completely boot from Live CD/USB, goto Applications -> type in search field "disks" and run Disks app. Then select your HDD\SSD and push Ctrl + Shift + F to format Partition. Turn Erase switch to ON, select Type of new File System and click Next button (right top corner of current window).

Another way you can run Applications -> GParted and do same with another interface: https://gparted.org/livecd.php

1

Simply formatting your computer leaves your data accessible to a clever hacker.

Better to zero out your hard drive so that no data can be recovered.

This can be done using dd when booted from a USB flash drive running Ubuntu Live.

dd if=/dev/zero of=/dev/sdx

where sdx is the hard drive partition. (ie sda)

This method can take time.

  • Isn’t formatting with the Erase option enabled (see S_Flash’s answer) comparable with manually filling zeroes? – Melebius Nov 13 '18 at 12:49
  • 1
    @Melebius: Some people prefer command line, both get the job done. dd works even if you can only boot to command line. – C.S.Cameron Nov 13 '18 at 13:25