What if you installed Ubuntu on your Windows computer but no longer want to use Linux? You now have a Linux partition on your hard drive that is taking up the space you want to use for Windows folders and files.
This article shows you how to safely uninstall Ubuntu in Windows 10 dual boot mode without losing data or applications.
The first part of this process is to remove the Linux operating system. Keep in mind that this will also delete all of your Ubuntu data and system files. Remember to save anything you don’t want to delete somewhere else. The second part of the process is to change the Windows bootloader.
Before making any changes to your computer, you always want to back up your files. Even if you’ve only used Linux for a short period of time, chances are there is data you want to keep.
Also, you want to back up all your important data from the Windows partition. Use an external hard drive, cloud storage, or DVD to avoid losing data.
Make sure you have a Windows USB or DVD. You can download a copy of Windows 10 from Microsoft.
– /
- Start by logging into Windows. While holding down Windows Key + R, type diskmgmt.msc to open the Windows Disk Management Tool.
Delete Linux Partition in Windows - Start by logging in to Windows. Press and hold Windows key + R and type diskmgmt.msc to open the Windows Disk Management utility.
Linux partitions are different from Windows partitions in that they do not have a disk number and file system.
Windows partitions can be identified by their drive label, such as C, D, and E. They are also usually FAT or NTFS files.
- To remove Linux partitions, right-click each one and select Remove Volume.
- A warning appears stating that you are trying to delete a non-Windows partition. You will then be asked if you want to delete it. Select “Yes”.
Removing partitions will free up space on your disk.
- If you have other Linux partitions, remove them in the same way. Right-click the free space and choose Delete Partition. Then click “Yes” when the dialog box appears.
- The free space is now replaced with unallocated space. To expand the Windows partition and take up some free space, right-click Unallocated Space and select Extend Volume from the drop-down list.
- The Volume Expansion Wizard will open. Click Next> Next> Finish.
After the process completes, you will only see one volume, which means that you have brought all your disk space back to Windows.
After you remove Linux partitions from your computer, the bootloader for Ubuntu still exists and must be removed as well. This can be done in several ways.
- Go to the Windows Start menu and click the power icon. Then press and hold the Shift key and select Restart.
- Continue to hold down the Shift key until you see the Select an Option screen.
- Select the Troubleshoot> Advanced Options> Command option. Immediate. Select your account in the command line options and enter your password.
- A command line terminal will open. Type bootrec / fixmbr and press Enter. See Success message.
- Then enter bootrec / fixboot> Enter. See the same message indicating that the operation completed successfully. Enter another command bootrec / scanos> Enter. This command will scan all of your drives to see if there are any instances of Windows. The time it takes to complete depends on the specifications of your system and the size and number of drives you have installed. When the scan is complete, you will see the Windows installations that are on your disk.
- To make Windows your primary boot OS, enter bootrec / rebuildbcd> Enter.
- If you have multiple Windows installations, you will see a list of all of them and they are stored on your disk. Enter Enter to complete the process.
- To close the terminal, enter exit> Enter. You have now successfully uninstalled everything related to Ubuntu. Your computer will now boot directly into Windows.
Remove Grub Bootloader - Go to the Windows Start menu and click on the Power icon. Then press and hold the Shift key and select Restart .
- Hold down the Shift key until you see Choose an option screen.
- Select Troubleshoot Advanced Options Command Prompt . Choose your user account from the command prompt options and enter your password.
- This will open a command line terminal. Type bootrec / fixmbr and press Enter . See the message that the process has completed successfully.
- Type the following bootrec / fixboot > Enter . Look at the same message that the process has completed successfully. Type another command bootrec / scanos > Enter . This command will scan all of your drives to see if there are any instances of Windows. The time it takes to complete depends on your system specifications, and the size and number of disks you have installed. When the scan completes, you’ll see the Windows installations you have on your disk.
- To make Windows your primary operating system, type the command bootrec / renbcd > Enter .
- If you have multiple Windows installations, you’ll see a list of all of them and where they are stored on your drive. Type A > Enter to complete the operation.
- To close the station, type Exit Enter . You have now successfully removed everything related to Ubuntu. Your computer will now boot directly to Windows.
- To overwrite the Linux bootloader with the Windows bootloader, insert the USB Windows Installer you downloaded above into your computer and restart it.
- After the system boots from the USB recovery drive, click “Repair your computer”.
- On the next screen, select the “Troubleshoot” option.
Replace Linux Boot Loader with Windows Boot Loader - To overwrite the Linux bootloader with Windows Bootloader, insert the USB Windows Installer you downloaded above into your computer and restart it.
- After booting your system from a USB recovery disk, click Repair Computer .
- From the next screen, choose the Troubleshoot option.
- Select Command Prompt from the next Advanced Options screen.
- In a Command Prompt window, enter bootrec.exe / fixmbr. This will fix the Windows bootloader.
- When you restart your computer, it will boot from your hard drive. Windows will now work as expected and Linux will no longer be on your system.
What if I don’t have a Windows installation CD or USB?
You can still remove Ubuntu dual boot from Windows 10 or Ubuntu as described below.
- On Windows 10, run Command Prompt as administrator.
- Run the command below to set the correct EFI executable as the default boot entry:
bcdedit / set “{bootmgr}” path efi microsoft boot bootmgfw.efi
- Restart your computer to test if the above command worked. If successful, it should boot directly into Windows.
- To delete partitions, follow the steps above, starting with diskmgmt.msc (“Deleting a Linux Partition on Windows” section)
- You can change the UEFI boot order directly from the firmware settings (BIOS). To access the BIOS from Windows 10, click the Start> Settings> Updates and Security button.
- You can Change the UEFI boot order directly from the firmware settings (BIOS) . To access BIOS from Windows 10, click the Start button Settings > Updates and Security .
- In the left column, click Restore. In the Advanced Startup section, click Restart Now.
- Select Troubleshoot> Advanced Options> UEFI Firmware Settings. On the UEFI firmware settings screen, click Restart. After that, your computer will reboot and boot into BIOS.
Change Boot Order with UEFI
Removing Ubuntu from Windows 10 Dual Boot is not difficult. You can use one of the above methods to do this without losing data.
–