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, and then uninstall it like you would any other program. The uninstaller automatically removes the Ubuntu files and boot loader entry from your computer. 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 broken down into two parts, of which the first part is to remove the Linux operating system and the second part 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 10 installation media handy. If you don’t have one readily available, you can create it on a Windows 10 computer or on a Linux or Mac computer.

1] Delete Linux partition from Windows 10

To delete the Linux partition from Windows 10, do the following:

Log into Windows 10.

Alternatively, you can run the command below in an elevated CMD prompt to set the correct EFI executable as the default boot entry: 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 wasn’t created by Windows. 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 10 OS, you can remove the dual-boot menu, so that the PC boots directly into Windows 10 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!