how to delete gnu grub

"So you deleted Linux, rebooted, and GNU GRUB is still staring back at you. Maybe you're stuck at a grub rescue> prompt, or maybe the GRUB menu just won't let you boot into Windows. You're not alone, and the fix is straightforward once you know which path to take.

Learning how to delete GNU GRUB properly depends entirely on how your system boots. The EFI System Partition on modern UEFI systems holds bootloader files separately from the MBR, which means the old "just fix the MBR" advice doesn't apply to most machines built after 2012. Let's figure out which method matches your setup."

how to delete gnu grub

Image source: Bing (Web (fair-use with source credit))

Quick Answer

To delete GNU GRUB, first determine if your system uses UEFI or Legacy BIOS. On UEFI systems, remove the GRUB EFI files from the EFI System Partition and delete the GRUB boot entry from firmware. On Legacy BIOS systems, use bootrec /fixmbr from Windows Recovery to overwrite GRUB with the Windows bootloader.

Always back up your EFI partition before making changes.

Why GRUB Is Still Stuck on Your Screen After Removing Linux

When you delete a Linux partition, you're removing the operating system files. You're not removing the bootloader that was installed alongside it. GRUB lives in a separate location depending on your boot mode, and that location survives a simple partition deletion.

On UEFI systems, GRUB places its EFI executable and module files on the EFI System Partition. This is a small FAT32 partition, typically 100 to 500 MB, that exists independently of any operating system partition. Your firmware's NVRAM also stores a boot entry pointing to grubx64.efi.

Delete the Linux partition and both of those remain untouched.

On Legacy BIOS systems, GRUB writes itself into the Master Boot Record. That's the first 512 bytes of your drive. Deleting partitions doesn't touch the MBR.

GRUB's stage 1.5 code, stored in the gap between the MBR and the first partition, also survives.

The result is the same either way. Your firmware still finds GRUB, GRUB still tries to load its configuration from the now-deleted Linux partition, and you end up at a grub rescue> prompt or a menu with broken entries.

The First Thing You Need to Check: UEFI or Legacy BIOS

UEFI firmware boot menu

Image source: Bing (Web (fair-use with source credit))

Everything that follows depends on this one distinction. UEFI and Legacy BIOS handle bootloaders in fundamentally different ways, and using the wrong method wastes time or makes things worse.

Here's how to check from Windows:

  1. Press Win + R, type msinfo32, and press Enter.
  2. Look for "BIOS Mode" in the System Summary.
  3. It will say either "UEFI" or "Legacy."

If you can't boot into Windows at all, you can check from your firmware settings. Reboot, enter your BIOS/UEFI setup (usually by pressing F2, F12, DEL, or ESC during startup), and look for a "Boot Mode" or "UEFI/Legacy Boot" option. If you see a graphical interface with mouse support, you're almost certainly on UEFI.

Why this matters so much:

Factor UEFI Legacy BIOS
Where GRUB lives EFI System Partition (FAT32) Master Boot Record + post-MBR gap
How firmware finds GRUB NVRAM boot entry pointing to .efi file First sector of boot drive
Fix method Remove EFI files + delete NVRAM entry Overwrite MBR with bootrec /fixmbr
Risk of data loss Low if you only touch the ESP Low if you target the correct drive

If you're on UEFI, skip to the UEFI section below. If you're on Legacy BIOS, jump to the Legacy BIOS section. Don't mix the methods.

How to Remove GRUB on a UEFI System

EFI System Partition file structure

Image source: Bing (Web (fair-use with source credit))

This is the more common scenario as of 2026. Most machines shipped in the last decade use UEFI with GPT partitioning. The process involves three distinct steps: removing the GRUB files, cleaning the firmware boot entry, and restoring Windows Boot Manager.

Back Up the EFI System Partition First

Before you touch anything, back up the ESP. Mount it from an elevated Command Prompt:

diskpart
list disk
select disk 0
list partition
select partition 1
assign letter=Z
exit

Then copy the entire contents of Z:\ to a USB drive or another safe location. If something goes wrong, you can restore the original EFI files.

Delete the GRUB EFI Files

With the ESP mounted as Z:, navigate to the GRUB directory:

cd /d Z:\EFI
dir

You'll see folders for each installed bootloader. Common names include ubuntu, fedora, arch, debian, and BOOT. Delete the folder corresponding to your removed Linux distribution:

rmdir /s Z:\EFI\ubuntu

Also check for a grub folder at the root of the EFI directory and remove it if present. Leave the Microsoft folder and the BOOT folder alone. Those belong to Windows.

Read also  Is Arizona Cardinals Field Grass Or Turf? The Facts Explained

Remove the GRUB Boot Entry from NVRAM

Even with the files gone, your firmware may still have a boot entry pointing to the old GRUB path. From Windows, open an elevated Command Prompt and list the current entries:

bcdedit /enum firmware

Look for an entry with "ubuntu," "GRUB," or your Linux distro name as the description. Note its identifier (a GUID in braces). Delete it:

bcdedit /delete {identifier-guid-here}

Alternatively, you can use your firmware's built-in boot manager. Reboot into BIOS setup, find the boot order or boot entries section, and remove any entry that references GRUB or your old Linux installation.

Rebuild the Windows Boot Manager Entry

If Windows Boot Manager isn't already the default, or if its entry got damaged, rebuild it:

bcdboot C:\Windows /s Z: /f UEFI

This copies the Windows bootloader files to the ESP and creates a fresh NVRAM entry pointing to bootmgfw.efi. The /s Z: flag targets your mounted ESP. The /f UEFI flag specifies the firmware type.

Set Windows Boot Manager as Default in Firmware

Reboot into your BIOS/UEFI setup one more time. Set "Windows Boot Manager" as the first boot option. Save and exit.

Your system should now boot directly into Windows without showing GRUB.

How to Remove GRUB on a Legacy BIOS System

Windows Recovery Environment command prompt

Image source: Bing (Web (fair-use with source credit))

If msinfo32 showed "Legacy" as your BIOS mode, GRUB is sitting in your Master Boot Record. The fix here is simpler but requires Windows installation media or a recovery drive.

Boot from your Windows installation USB or recovery drive. Select your language, then choose "Repair your computer" instead of "Install now." Navigate to Troubleshoot > Command Prompt.

Repair the Master Boot Record

Run this command first:

bootrec /fixmbr

This writes a new Windows MBR to the first sector of your boot drive. It overwrites GRUB's stage 1 code. Your system will now look for the Windows bootloader instead of GRUB.

Fix the Boot Sector

Next, repair the boot system partition:

bootrec /fixboot

This writes a new boot sector to the system partition. On some systems, especially if you get "access denied" here, you may need to select and format the system partition first using diskpart, but that's rare on standard Windows installations.

Rebuild the Boot Configuration Data

Finally, rebuild the BCD store:

bootrec /rebuildbcd

This scans for Windows installations and recreates the boot configuration. If it finds your Windows install, confirm with Y to add it to the boot list.

Type exit, remove the installation media, and reboot. You should boot straight into Windows.

What to Do If You're Stuck at the GRUB Rescue Prompt

The grub rescue> prompt appears when GRUB can't find its configuration file or modules. This usually means you deleted the Linux partition but GRUB is still the active bootloader. You have two options.

Option 1: Boot Windows manually from the rescue prompt. This is a temporary workaround to get into Windows so you can apply the proper fix above.

At the grub rescue> prompt, list your drives and partitions:

ls

You'll see output like (hd0) (hd0,gpt1) (hd0,gpt2) or (hd0) (hd0,msdos1). Check each partition to find your Windows installation:

ls (hd0,gpt2)/

Look for a partition that contains a Windows directory. Once you found it, set it as the root:

set root=(hd0,gpt2)

Then chainload the Windows bootloader:

chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot

On Legacy BIOS systems, the path differs:

set root=(hd0,msdos1)
chainloader +1
boot

This should get you into Windows. From there, apply the UEFI or Legacy BIOS fix described above so you don't have to do this every time.

Option 2: Boot from Windows installation media. If the manual chainloading doesn't work, insert your Windows USB, boot from it, and follow the repair steps in the Legacy BIOS or UEFI sections above. This is often faster than fighting with the rescue prompt.

Common Mistakes That Make Things Worse

A few errors come up repeatedly. Avoiding them saves you a reinstall.

  • Running bootrec /fixmbr on a UEFI system. This does nothing useful on UEFI because the MBR isn't involved in the boot process. You'll waste time and wonder why GRUB is still there.
  • Deleting the entire EFI System Partition. This removes Windows Boot Manager too. Your system won't boot at all. Only delete the Linux-specific folders inside \EFI\.
  • Using diskpart clean on the wrong drive. This wipes the entire disk, including all partitions and data. Double-check your disk number before running any destructive command.
  • Skipping the NVRAM cleanup. Even after deleting GRUB's files, a stale firmware boot entry can cause errors or a boot loop. Always remove the entry from firmware settings or with bcdedit /delete.
  • Not backing up the ESP first. If you accidentally delete the Microsoft folder, you need that backup to restore it. The two-minute backup saves hours of recovery.
  • Assuming Secure Boot will block GRUB. Secure Boot can actually make things more complicated if GRUB was signed. Disabling Secure Boot temporarily during the cleanup process can help, then re-enable it afterward.
Read also  How Can I Kill Dandelions in My Lawn

Quick Decision Guide: Which Method Do You Need?

Use this to find your path without reading every section.

If your system uses UEFI (most systems from 2012 onward):

  1. Mount the EFI System Partition.
  2. Delete the Linux folder from \EFI\.
  3. Remove the GRUB boot entry from firmware or with bcdedit.
  4. Run bcdboot C:\Windows /s Z: /f UEFI to restore Windows Boot Manager.
  5. Set Windows Boot Manager as default in BIOS.

If your system uses Legacy BIOS:

  1. Boot from Windows installation media.
  2. Open Command Prompt from the recovery environment.
  3. Run bootrec /fixmbr, then bootrec /fixboot, then bootrec /rebuildbcd.
  4. Reboot.

If you're at a grub rescue> prompt right now:

  1. Try chainloading Windows manually using the steps above.
  2. If that fails, boot from Windows installation media and run the appropriate repair commands.

Frequently Asked Questions

Will deleting GRUB affect my Windows installation?

No. GRUB and Windows Boot Manager are separate bootloaders. Removing GRUB only removes the Linux bootloader.

Your Windows files, programs, and data remain untouched as long as you don't delete the Microsoft folder in the EFI partition.

Can I remove GRUB without a Windows installation USB?

On UEFI systems, yes. If you can boot into Windows (even through the GRUB menu or manual chainloading), you can clean the ESP and NVRAM from within Windows. On Legacy BIOS systems, you'll need installation media because the MBR repair tools aren't available from within a running Windows session.

What if I dual-boot and want to keep Linux but remove GRUB from the boot menu?

You don't need to delete GRUB. Instead, change the boot order in your UEFI firmware settings to put Windows Boot Manager first. Your system will boot straight to Windows by default, and you can access Linux by manually selecting GRUB from the firmware boot menu (usually F12 at startup).

Is it safe to delete the EFI System Partition?

No. The ESP contains bootloaders for all installed operating systems, including Windows. Deleting it will make your system unbootable.

Only delete the specific Linux subfolder within the \EFI\ directory.

Why does GRUB still show up after I deleted Linux and fixed the MBR?

You're likely on a UEFI system. On UEFI, the MBR isn't used for booting. GRUB persists because its EFI files are still on the EFI System Partition and the firmware still has a boot entry pointing to it.

Follow the UEFI removal steps instead.

How long does the whole process take?

On UEFI systems, about 10 to 15 minutes if you know what you're doing. On Legacy BIOS, roughly 5 to 10 minutes. Add extra time for creating a Windows recovery drive if you don't already have one.

What to Do If You're Stuck at the GRUB Rescue Prompt

The grub rescue> prompt appears when GRUB can't find its configuration file or modules. This usually means the Linux partition is gone but GRGRUB is still the active bootloader. You have two paths forward from here.

Boot Windows manually from the rescue prompt. This is a temporary workaround to get into Windows so you can apply the proper fix described earlier. At the grub rescue> prompt, list your drives and partitions by typing:

ls

You'll see output like (hd0) (hd0,gpt1) (hd0,gpt2) or (hd0) (hd0,msdos1) depending on your partition scheme. Check each partition to find your Windows installation:

ls (hd0,gpt2)/

Look for a partition containing a Windows directory. Once you find it, set it as the root and chainload the Windows bootloader:

set root=(hd0,gpt2)
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot

On Legacy BIOS systems the path is slightly different. Use chainloader +1 to load the first sector of the partition instead of specifying an EFI file.

Read also  How To Clean Solar Lawn Lights For Better Brightness

If manual chainloading fails, boot from Windows installation media. Insert your Windows USB, boot from it, and run the repair commands from the Legacy BIOS or UEFI sections above. This is often faster than debugging the rescue prompt.

Common Mistakes That Make Things Worse

A few errors come up repeatedly and turn a simple fix into a recovery job. Avoiding them saves you a reinstall.

  • Running bootrec /fixmbr on a UEFI system. This does almost nothing on UEFI because the MBR isn't involved in the boot process. You'll waste time and still see GRUB afterward.
  • Deleting the entire EFI System Partition. This removes Windows Boot Manager too. Your system won't boot at all. Only delete the Linux-specific folders inside \EFI\.
  • Using diskpart clean on the wrong drive. This wipes the entire disk including all partitions and data. Double-check your disk number before running any destructive command.
  • Skipping the NVRAM cleanup. Even after deleting GRUB's files, a stale firmware boot entry can cause errors or a boot loop. Always remove the firmware entry.
  • Not backing up the ESP first. If you accidentally delete the Microsoft folder, you need that backup. The two-minute backup saves hours of recovery.
  • Assuming Secure Boot will block GRUB. Secure Boot can actually complicate things if GRUB was signed. Disabling Secure Boot temporarily during cleanup helps, then re-enable it once Windows Boot Manager is restored.

Quick Decision Guide: Which Method Do You Need?

This guide gets you to the right steps without rereading the full article.

If your system uses UEFI (most systems from 2012 onward):

  1. Mount the EFI System Partition.
  2. Delete the Linux folder from \EFI\.
  3. Remove the GRUB boot entry from firmware or with bcdedit.
  4. Run bcdboot C:\Windows /s Z: /f UEFI.
  5. Set Windows Boot Manager as default in BIOS.

If your system uses Legacy BIOS:

  1. Boot from Windows installation media.
  2. Open Command Prompt from the recovery environment.
  3. Run bootrec /fixmbr, then bootrec /fixboot, then bootrec /rebuildbcd.
  4. Reboot.

If you're at a grub rescue> prompt right now:

  1. Try chainloading Windows manually using the steps above.
  2. If that fails, boot from Windows installation media and run the appropriate repair commands.

Frequently Asked Questions

Will deleting GRUB affect my Windows installation?

No. GRUB and Windows Boot Manager are completely separate. Removing GRUB only affects the Linux bootloader.

Your Windows files, programs, and data stay untouched as long as you don't delete the Microsoft folder in the EFI partition.

Can I remove GRUB without a Windows installation USB?

On UEFI systems, yes. If you can boot into Windows (even through the GRUB menu or manual chainloading), you can clean the ESP and NVRAM from within Windows. On Legacy BIOS systems, you'll need installation media because the MBR repair tools aren't available from a running Windows session.

What if I dual-boot and want to keep Linux but remove GRUB from the boot menu?

You don't need to delete GRUB. Change the boot order in your UEFI firmware settings to put Windows Boot Manager first. Your system boots straight to Windows by default.

Access Linux by manually selecting GRUB from the firmware boot menu, usually F12 at startup.

Is it safe to delete the EFI System Partition?

No. The ESP contains bootloaders for all installed operating systems including Windows. Deleting it makes your system unbootable.

Only delete the specific Linux subfolder within the \EFI\ directory and leave everything else alone.

Why does GRUB still show up after I deleted Linux and fixed the MBR?

You're likely on a UEFI system. On UEFI, the MBR isn't used for booting. GRUB persists because its EFI files are still on the EFI System Partition and the firmware still has a boot entry pointing to them.

Follow the UEFI removal steps instead.

How long does the whole process take?

On UEFI systems, about 10 to 15 minutes if you know what you're doing. On Legacy BIOS, roughly 5 to 10 minutes. Add extra time for creating a Windows recovery drive if you don't already have one.

Most of that time is rebooting and navigating firmware menus.