Ubuntu – How to find out which partition Ubuntu is installed on

partitioning

I want to uninstall Ubuntu, so I need to delete its partition.

I saw that many people asked this before. For example: How to find out which partition is Ubuntu installed on?. I followed the instructions there and here's a screenshot of the terminal after typing the suggested command (df):

df output in gnome terminal

But this doesn't tell me anything…

This has also been discussed before Uninstalling Ubuntu. Which partitions to delete? and the answer was: EFI and primary. But I have a lot of primary partitions and I'm not sure which one to delete.

Here's a screenshot of Disk Management in Windows:

list of partitions

Here's a GParted screenshot:

many partitions

So can anybody tell me which the Ubuntu partitions are? (I numbered them from left to right, so to make it easy just tell me numbers please)

Best Answer

Do not remove /dev/sda1 (The 1st partition) The EFI partition is part of UEFI and is used by both Windows and Ubuntu. If you delete it, the computer won't boot.

Comparing the Gparted and Disk Management screenshots, you want to delete 5th, 6th, and 7th partition as displayed in Windows Disk Management. Or /dev/sda9, /dev/sda10, /dev/sda11 as displayed in gparted.

You will still have to remove GRUB after removing those partitions.

See How to remove Ubuntu and put Windows back on? for how to easily remove Ubuntu.

Finally, remove the Ubuntu boot entry (or entries) in the UEFI boot manager in the image below:

enter image description here

See How do I remove "Ubuntu" in the bios boot menu? (UEFI)

You will need to boot from Ubuntu Live DVD/USB to temporarily install efibootmgr.

In the Live boot, (Use Try Ubuntu without installing) Open a terminal by pressing Cntrl+Alt+T: and enter the following commands:

sudo apt-get install efibootmgr
sudo modprobe efivars
sudo efibootmgr

This will show you which entries in the UEFI boot manager refers to the old Ubuntu install.

To remove entry number X enter:

sudo efibootmgr -b X -B 

Replace X with the correct number.

Repeat the last two commands if there are more than one entries.

Note: I have removed the part about OS Uninstaller, as some people seems to have problem with it.

Hope this helps

Related Question