You may have installed Ubuntu or any other Linux distro on your PC alongside Windows 11/10. But maybe now if you don’t want to use Linux anymore. In this case, you will end up having a Linux partition on your hard drive that is taking up some disk space. In this post, we will show you how to safely uninstall Linux in Windows dual boot without losing data or applications.
If you installed Ubuntu or a similar Linux distribution like Linux Mint with Wubi, you can easily uninstall the distro via the Programs and Features applet in Windows 10. Find Ubuntu in the list of installed programs, then uninstall it like any other program. The uninstaller automatically removes your computer’s Ubuntu files and boot loader entry.
On the other hand, if you installed Linux to its own partition in a dual-boot configuration, uninstalling it requires removing the Linux partitions from your computer and then expanding your Windows partitions to use the now-free hard disk space.
Uninstall Linux in Windows Dual Boot setup
This procedure is divided into two parts: the first is to remove the Linux operating system, and the second is to repair the Master Boot Record, as just deleting the Linux partition will result in a Grub rescue error.
Before you begin, you can back up your files and make sure you have a Windows installation media handy. If you don’t have one readily available, you can create it on a Windows computer or on a Linux or Mac computer.
1] Delete Linux partition from Windows
To delete the Linux partition from Windows 11/10, do the following:
- Log into Windows.
Alternatively, you can run the command below in an elevated CMD prompt to set the correct EFI executable as the default boot entry:
bcdedit /set “{bootmgr}” path \efi\microsoft\boot\bootmgfw.efi
To see if the above command worked, reboot your computer. If successful, it should boot directly to Windows.
- At the desktop, press Windows key + R to invoke the Run dialog.
- In the Run dialog box, type
diskmgmt.msc
, hit Enter to open the Disk Management tool.
Linux partitions are differentiated from Windows because they don’t have a drive number and file system. While, Windows partitions can be identified by the drive label such as C, D, and E. They are also usually FAT or NTFS files.
- To delete the Linux partitions, right-click on each one and choose Delete Volume.
- A warning will pop-up letting you know that you are trying to delete a partition that Windows didn’t create. Then, you will be asked if you want to delete it.
- Select Yes.
- Repeat the process to delete other Linux partitions.
Deleting the partitions will free up space on your drive. Now, you’ll need to extend your Windows partition to occupy the free space.
After the process is complete, you will see only one volume meaning you have claimed all your disk space back to Windows.
You can now proceed with the next step.
2] Repair the Master Boot Record (MBR)
Linux has now been removed from your computer, but its boot loader persists. We’ll need to use a Windows installation media to repair and rebuild MBR so as to overwrite the Linux boot loader with the Windows boot loader.
Note: If the bootrec.exe /fixmbr
command didn’t work, you can try Automatic Repair from the Advanced troubleshooting options.
Once done, you can now restart your computer. It will boot from its hard drive, starting Windows normally. All traces of Linux should now be erased – but, if when you boot the computer and you’re presented with the dual-boot menu, listing the Linux distro you’ve just removed along with the Windows OS, you can remove the dual-boot menu, so that the PC boots directly into Windows when you restart your computer, by following these steps:
- Press Windows key + R to invoke the Run dialog.
- In the Run dialog box, type
msconfig
and hit Enter. - Go to Boot tab.
- Select the Windows 10 entry.
- Click Set as Default button.
- You can delete the Linux entry by selecting it and then clicking the Delete button.
- Click Apply.
- Click OK.
- Restart your computer.
That’s it!
Read: Install Linux over or alongside Windows using Tunic software.