Blog

How to Delete GRUB off of Windows’ EFI Partition

The scenario is this: You previously had a dual boot system, where you could load into either Windows or Linux. At some point, you decided Linux is no longer worth the hassle, so you removed that partition. Now, your PC continues to load the GRUB boot loader, which gives an error, since it can’t find the non-existent Linux partition. So, you want to remedy this problem and delete GRUB altogether. Let’s see how.

Fortunately, you won’t need to load into the Windows installation environment, you won’t need to utilize the recovery partition, etc. You just need to load into Windows, then it should be pretty simple.

Deleting GRUB

Step 1: Load into Windows. Yeah, I know GRUB loads by default, but you can access your PC’s boot menu by pressing ESC or (depending on your manufacturer) some other key during the very beginning of the boot process. In the boot menu, you’ll be able to select the Windows boot loader.

Step 2: Once in Windows, open a command prompt with administrator permissions.

Step 3: We need to assign a drive letter to the EFI partition, so that we can access it and delete GRUB manually. Begin by executing:

diskpart

Step 4: List the disks, so we know which one to select:

list disk

Step 5: Select the drive that has the EFI partition on it – probably the C: drive, but you’ll know your setup better than me.

select disk 0

Step 6: List the partitions:

list partition

Step 7: Select the EFI partition – it’s the one that’s about 100 MB in size:

select partition 1

Step 8: Assign it a drive letter. Any drive letter that happens to be available:

assign letter=z

Step 9: Exit the diskpart utility:

exit

Step 10: Navigate to the EFI partition’s EFI directory:

z:
cd EFI

Step 11: Check what files are present:

ls

Step 12: Remove any directories related to GRUB or Linux. In my case, it was just one, ‘ubuntu’:

rmdir /S /Q ubuntu

Step 13: Reboot the computer and it should load right into Windows without a fuss this time. The drive letter you assigned earlier will automatically disappear.