DEV Community

Silla Priyadarshni for Spectrum Club

Posted on

Uninstall Ubuntu Dual Boot How to remove "Ubuntu" completely from a dual boot PC (UEFI)?

Did you mess around with Ubuntu while dual booting? Do you too want to remove it completely now? Then take a sip. The post is for you.

So let's start. Run windows and open disk management. (You can search it or click on the option directly on "start" menu)

Once the disk management window opens, identify the Linux(Ubuntu) partitions and remove it. To do so, follow the process. Check the partitions which has no drive names and are larger than 1gb. (Hint: choose Healthy primary partitions) Once you have identified the partitions, right click >> Delete volume >> Yes.

If you have free space (unallocated memory), merge it with another partition to use it back again later. To do so, right click >> Extend volume >> Next >> Next >> Finish.

Ah, Kudos! You did it :))

Reboot the system.
You will still find ubuntu on the boot menu. This is because you have just deleted the Linux partitions whereas the grub boot loader is still present in your PC's efi partition. So the next step is to remove it.

For this, first launch command prompt as administrator. (Start>>CMD>> run as administrator). Now type "diskpart" to start the diskpart utility. Now type "list disk" to identify the efi partitions. Now type "select disk 0". Then type "list partition" and identify the efi "system" partition. Then type "select partition 2". In my case, the efi partition system had partition number 2 and it might vary in your case. Then type "assign letter=x" (I chosed x and it's random). Now you will see a 100 mb partition in windows explorer. That's your efi system partition. This is for our knowledge. We don't need to do anything here. Let's get back to our command prompt. Now type "exit" to close diskpart. Now type the letter which you have assigned in the CMD line and place a colon with it. I am typing " x:" and pressing enter key. Now type "dir" to see the contents of drive x. Now we have to change folder so type "cd efi" and type "dir" to see the contents of efi folder.

Now you will be seeing the list where a folder named of Linux that you have installed once (like Ubuntu, fedora, blah blah). That's the folder which we want to delete. Type "rd /s". I am typing "rd ubuntu /s". Type Y to conform deletion. Type "dir" to ensure the folder is deleted.

Yes, we did it.
Now we have successfully uninstalled Ubuntu completely from our PC. The efi system which we mounted will automatically get unmounted once you restart your PC. Don't worry.

Any queries, let me know :)

Top comments (9)

Collapse
 
coderkingui profile image
Armid khanal

I created efi partition while installing ubuntu and windows but when i remove ubuntu i have system reserved partition and another efi partition. my windows is in system reserved can i delete the another efi?

Collapse
 
dstri26 profile image
Trideep Barik

Thanks a lot! That just saved so many googling hours. That's one of the "noone talks about it" programmer's problem. 😅

Collapse
 
syntaxhacker profile image
Info Comment hidden by post author - thread only accessible via permalink
syntaxhacker

Maybe you just need to Google stuff
dev-to-uploads.s3.amazonaws.com/i/...

Collapse
 
tallusoxidane profile image
Tallus Oxidane

If only everyone explains the procedure with the simplicity you have explained.
Thanks a lot.
Worked like a charm.

Collapse
 
kchavellas profile image
Kichos Chavellas

This is the hard way. The easy way is to uninstall grub from Linux. Then you can do whatever you like with the Linux partition from the other OS.

Collapse
 
abhilash671584 profile image
abhilash671584

Awesome!! Thanks!!

Collapse
 
erfizt profile image
Erfizt

Wow, work for me

Collapse
 
frozengirl_spd profile image
Silla Priyadarshni

Glad. Thanks for letting me know

Collapse
 
athena profile image
Athena-Bahrami

Thanks for sharing... hnow how can i delete the x: directory we made?

Some comments have been hidden by the post's author - find out more