DEV Community

loading...
Spectrum Club

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

frozengirl_spd profile image Silla Priyadarshni ・2 min read

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 :)

Discussion (10)

pic
Editor guide
Collapse
enmanuelgarias5 profile image
Enmanuel García

Small problem, when I installed Ubuntu it kept loading straight into windows so after a google search I ended up finding a cms command which from what I gather changed the booting order. Now after I’ve done this when I turn on my laptop it keeps flashing some letters and I have to hold down the power key turn it back on and press f9 to select windows booting system manually, could you pleas tell me how to fix this. 🙏

Collapse
enmanuelgarias5 profile image
Enmanuel García

Found the fix command: bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi

Collapse
frozengirl_spd profile image
Silla Priyadarshni Author

Glad. Thanks for letting me know

Collapse
enmanuelgarias5 profile image
Enmanuel García

This was the command
bcdedit /set {bootmgr} path \EFI\debian\grubx64.efi
How do I revert it

Collapse
frozengirl_spd profile image
Silla Priyadarshni Author

Hey, sorry, just saw your text. Were you able to fix this? Are you stuck?

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
syntaxhacker

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

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
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
tallusoxidane profile image
Tallus Oxidane

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