-3

I've got Ubuntu on my laptop and I want to completely remove it so I have no OS on it.

Google provides no answers which would be relative, they are only like "How to delete Ubuntu if you have Windows/and then install Windows".

My Ubuntu is 20.04, as I remember. If possible, tell me the detailed steps.
Thanks in advance!

Additional: The possible way is to format disk, but I have no idea how to do it because Ubuntu don't let me to.

  • The steps applied to deleting a distro as part of a hard disk also apply to the whole disk that you want to get rid of. If you have difficulties understand specific steps, please add those parts to the question. – eblock Jun 5 at 14:12
  • What is a computer without OS good for? You can format your disks if you want to remove everything, but note that it will be hard to use the computer afterwards. – choroba Jun 5 at 14:13
  • That's the problem, I have no idea how to format disk because it just doesn't let me to do it in Ubuntu. – KViiTEN Jun 5 at 14:14
  • @eblock Done, added – KViiTEN Jun 5 at 14:16
  • 1
    Should be fairly easy from a live CD or booting a from a USB stick... – Kusalananda Jun 5 at 14:16
0
  • Boot your system using an Ubuntu liveCD / liveUSB image or installation media.
  • Rather than launching the Ubuntu installer, instead launch fdisk or another partition editor such as parted in your preferred a Terminal program to alter the partition table of the disk in question (e. g. sudo fdisk /dev/sda). If you're unclear how to use the partition editor, in another Terminal window consult the manual with man.
  • Delete all partitions from the hard disk in question (e. g. /dev/sda). Be certain you're operating on the correct medium.
  • Write the changes to the disk.
  • If you also want to wipe the boot sector, run the following command:
$ sudo dd if=/dev/zero of=/dev/sda bs=512 count=1

Be advised this will remove all partition information, but is not a "disk wipe" or "secure delete". If you want to truly be certain that data can not be recovered, the most effective tool to use is a hammer.

| improve this answer | |
  • Where do I get liveCD iso file? Sorry if this is a dumb question. And after it, can I use Rufus to make USB drive out of ISO? – KViiTEN Jun 5 at 14:23
  • If you have an optical drive (e. g. a CD/DVD burner drive), you can use dd to burn the image to disk. If your system is still running Ubuntu currently, a guide to a bootable flash drive creator can be found at ubuntu.com/tutorials/tutorial-create-a-usb-stick-on-ubuntu – DopeGhoti Jun 5 at 14:25
  • parted might be a better choice than fdisk. – terdon Jun 5 at 14:30
0

I assume you have only one drive in your laptop. Just execute

sudo dd if=/dev/zero of=/dev/sda bs=128M

and wait. It will delete everything on the first drive (including other operating systems and user-data). The system will crash sooner or later, so this is not a perfectly safe method in sense of data security.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.