January 5, 2024 - Reading time: ~6 minutes
Scenario: You have installed Windows 10/11 and let's say you installed also a Linux distro in the same HDD.
But after tried the Linux distro you don't want to use it anymore.
You deleted the partitions where the Linux distro was installed but still when you boot up your computer, the boot loader shows up the GRUB installed previously with the Linux distro still there.
How to restore the default bootloader so it can just start windows normally?
If you want to boot back into Windows by default and get rid of the Linux installation entirely, you'll need to go to the Windows command line.
The steps to remove the (in this case) Ubuntu/Debian bootloader require the use of the Windows 10/11 tool diskpart, with which yours too Erase EFI partitions can. This is how you do it:...
type: diskpart
type: list disk
type: sel disk 0
to select the HDD where both win and was installed. Here on this HDD is also installed the EFI bootloader
type: list vol
Here we list the volumes of the selected HDD (in your case the volumes can be different from the picture below) but on what we are interested is the bootloader volume. This is where EFI resides and is special because the modern OS Win 10/11 creates it usually with the size of 100 MB and in FAT32 file system.
type: sel vol x
where x is the vol number identified previously (in my case was Volume 8).
type: assign letter=z
We have now mounted the partition and no more need the diskpart so we can exit type: exit
What next!
Now we can navigate to the mounted partition on drive Z: using the command prompt (if we use a normal explorer probably we will get an error that we don't have rights to access the drive).
type: z:
in the cmd and hit enter to move to the Z:\ drive (z is the drive letter we assigned, if you assigned another letter, need to use that)
type: dir
to list the content of Z drivetype: cd EFI
to move to the EFI directorytype: dir
to list the content of EFI directorytype: rmdir /s debian
to remove the directory related to Linux distro (the name can change, it can be also ubuntu, rhel... based on the Linux distro you used)Now you can close the command prompt and just restart your pc.
That's it...