How to uninstall Linux | Remove GRUB | restore Windows bootloader
If Linux is simply not your thing - that's fully understandable and you can of course fully uninstall it from your computer. There are a few scenarios though, depending on how Linux OS was installed:
- Linux was installed via "Erase disk and install XXXXXXX" approach, completely wiping the hard drive and installing Linux fresh.
- In this case, you will need a bootable medium with the installer for the previous Operating System you had prior, which most likely will be Windows. Once you boot with it - fully erase the hard drive disk and install Windows fresh.
- Linux was installed alongside Windows Boot Manager
-
Remove/Clear Linux partitions from hard drive:
- Boot into Windows (When you turn on your computer, you should see the GRUB bootloader menu, allowing you to choose between Linux and Windows. Select "Windows Boot Manager").
- Open Disk Management.
- Identify Linux Partitions (In Disk Management, you’ll see a list of all partitions on your system. Look for partitions associated with Linux. These are usually formatted as ext4 or another Linux file system and will not have a drive letter (like C: or D:), like Windows partitions do.) and delete it. NOTE: Be very careful here as ALL partitions can be modified/removed from Disk Management and once you delete a partition - data is permanently gone!
- Boot into Windows (When you turn on your computer, you should see the GRUB bootloader menu, allowing you to choose between Linux and Windows. Select "Windows Boot Manager").
- Remove the UEFI Boot Entry for Linux:
- Open Command Prompt as Administrator (Click on the Start menu, type “cmd”, right-click on “Command Prompt”, and choose “Run as administrator”).
- In the opened Command Prompt, run this command:
-
bcdedit /enum firmware
- It will show boot entries, including Windows and Linux. Look for Linux entry (if you had Linux Ubuntu or Linux Mint installed, it will say "Ubuntu" next to "description" and something similar to "\EFI\ubuntu\shimx64.efi" next to "path".
- Note/write down the "identifier" of the boot entry for Linux inside curly brackets {}:
- Delete Linux boot entry by running the following command and hit Enter (you should see a message confirming the operation was completed successfully):
-
bcdedit /delete {identifier}
-
bcdedit /delete {identifier}
- It will show boot entries, including Windows and Linux. Look for Linux entry (if you had Linux Ubuntu or Linux Mint installed, it will say "Ubuntu" next to "description" and something similar to "\EFI\ubuntu\shimx64.efi" next to "path".
-
bcdedit /enum firmware
- Open Command Prompt as Administrator (Click on the Start menu, type “cmd”, right-click on “Command Prompt”, and choose “Run as administrator”).
- If Linux was installed on the same hard drive, you may want to extend Windows partition to claim the emptied space by eliminating the partition, which was used by Linux:
- Open Disk Management.
- Right-click on the Windows partition (typically the C: drive) in Disk Management, then select “Extend Volume” and follow the prompts to extend the partition into the unallocated space.
- The unallocated space will be added to the selected partition, increasing the available space for Windows.
-
Remove/Clear Linux partitions from hard drive:
Re-enable Secure Boot (if it was disabled for any reason for Linux installation or Windows fresh re-install):
- Enter BIOS/UEFI Settings.
- Enable Secure Boot and Fast Boot.
- Save changes and exit.