- How to Uninstall Ubuntu from Windows Dual Boot Safely
- Uninstall Ubuntu safely from Windows dual boot mode
- Part 1: Run a sanity check and make Windows as default boot manager
- Step 1: Access UEFI boot settings
- Step 2: Move Windows Boot Manager up the boot order
- Part 2: Deleting Linux partition on Windows
- Step 1: Go to disk management
- Step 2: Identify Linux partition
- Step 3: Delete Linux partition
- Step 4: Extend Windows partition
- Step 1:
- Step 2:
- Step 3:
- Step 4:
- Step 5:
- Step 6:
- Step 7:
- Step 8: If the trick in step 6 didn’t work
- Ubuntu Documentation
- Before you Start
- OS-Uninstaller Graphical Tool
- Alternative: via gParted and GRUB update
- Boot the Disc
- Run GParted and Locate Windows
- Deleting the Windows Partition
- Use the Newly Freed Space
- Resizing an Existing Partition
- Creating a New Partition
- Further Operations
- Edit GRUB
- Edit /etc/fstab
- Reboot
- Other Resources
How to Uninstall Ubuntu from Windows Dual Boot Safely
Last updated April 20, 2020 By Abhishek Prakash 187 Comments
Brief: This beginner’s guide shows you how to safely remove Ubuntu or any other Linux distribution from Windows dual boot.
Trust me, installing Ubuntu in dual boot with Windows is not that difficult a task. Similarly, removing Ubuntu from dual boot is also not that complicated.
In both cases, you need to take a bit of precautions with disk partitions. Having a Windows recovery and proper backups always helps.
In this tutorial, I am going to show you the steps for uninstalling Ubuntu from Windows dual boot. The steps should be equally valid for any other Linux distribution be it Linux Mint, Debian, Fedora, Arch etc.
Uninstall Ubuntu safely from Windows dual boot mode
The process is composed of two parts:
- Change the boot order in UEFI settings and give priority to Windows Boot Manager. You may also delete Grub entry from UEFI setting, if your system gives you this option. If that doesn’t work then you’ll have to repair boot with a bootable Windows disk.
- Deleting the Ubuntu partition from Windows.
As the last resort, you need to have a bootable Windows disk or recovery disk so that you can use it to repair the boot after removing Ubuntu (if needed).
Part 1: Run a sanity check and make Windows as default boot manager
I want you to have as few troubles as possible. And hence I recommend change the boot setting and make Windows boot manager as the default option to boot.
Let me explain a bit here. When you install Ubuntu or some other Linux, it adds Grub bootloader to your boot settings and makes it the default.
So, now your system has two boot loaders or boot manager (whatever you want to call it). Grub gives you option to boot into Ubuntu or Windows.
Windows boot manager lets you boot into Windows directly. And this is what you are going to use here.
Step 1: Access UEFI boot settings
Before you go on and delete the Linux partition, it will be a wise move to check if you can make Windows boot manager as the default boot option. This way, when you remove Linux, your boot process won’t be disturbed.
Access the UEFI settings from Windows. Search for UEFI and go to Change advanced startup options:
Click on Restart now:
On the blue screen next, select Troubleshoot:
Select Advanced Options next:
On the next screen, select UEFI Firmware Settings:
Hit restart button on the next screen:
Step 2: Move Windows Boot Manager up the boot order
Now your system will boot into UEFI settings. Now, the next screen will look different for different systems and manufacturers. You have to look for boot tab here.
On my Acer predator, it looks like the image below. Here, use arrow keys to select Windows Boot Manager and press F5 to move it up the order. Press F10 to save and exit.
Now, your system should boot straight into Windows. To verify, restart your system a couple of times and see if the system boots into Windows without showing the grub screen of Linux.
If that happens, you are good to go with the next step which is to delete the Linux partition and reclaim your disk space.
Part 2: Deleting Linux partition on Windows
Let’s see how to delete the Linux partition and extend your Windows disk with available freespace afterwards.
Step 1: Go to disk management
Log into Windows. Press Windows+R and type diskmgmt.msc into the dialog box. This will open the Windows disk management tool.
Step 2: Identify Linux partition
Since you installed Linux, it’ll be easy for you to recognize the Linux partition by its size.
Another hint for identifying the Linux partition is to look for those that don’t have a file system and drive number. Windows partitions are labeled with a drive number, such as C, D, E, etc., and usually use the NTFS or FAT file system.
As you can see, I have three Linux partitions here as I created root, swap and home separately when I installed Ubuntu.
Step 3: Delete Linux partition
Select the Linux partition(s), right click on them and opt for the Delete Volume option.
It will throw you a warning – just select Yes here.
Step 4: Extend Windows partition
The deleted partition(s) will now be available as a chunk of free space. You can either extend the existing volume or create a new Windows partition from it.
I would suggest that you create a new drive (or volume or partition, whatever you want to call it) as this will be easier if you decide to dual boot Linux with Windows again.
After deleting the Linux partition, of your system boots into a broken Grub screen which shows a message like grub rescue error, you need to use Windows recovery disk and fix the Windows bootloader.
Step 1:
Put in the Windows installation disk and restart your computer. Press F10 or F12 at boot time to go into BIOS/UEFI and choose to boot from removable disk.
Step 2:
Choose to repair your computer:
Step 3:
Go for the Troubleshoot option here:
Step 4:
On the troubleshooting page, choose Advanced options:
Step 5:
Look for the command prompt option in here:
Step 6:
In the command line, type the following command to fix the Windows boot loader:
Normally, it works instantly. You don’t even have to wait for it.
Step 7:
Once it’s done, restart your computer and this time boot normally from the hard disk. You should be able to boot into Windows. If you still see a Grub rescue error, try the steps below.
Step 8: If the trick in step 6 didn’t work
If the command in step 6 didn’t work, try Automatic repair from the advanced troubleshooting options.
It will take some time to find the issue and then repair it.
Now if you reboot, you should go into Windows normally without seeing any Grub rescue error thingy.
I hope this guide helped you safely remove Ubuntu from Windows dual boot. Feel free to ask any questions or make a suggestion.
Like what you read? Please share it with others.
Ubuntu Documentation
Before you Start
Before you start fiddling with your partitions, you should make sure that you have ALL IMPORTANT data backed up, preferably on a secondary hard drive (internal or external), a USB flash drive, or a CD-R or DVD-R. Although it is not common for problems to happen during the partitioning process, it is still possible. Actually, the primary cause of data loss is you! Users sometimes get confused and end up deleting the wrong partition, or just forget to backup their family photos and favorite music before they delete partitions. If at any point during this process you get confused or concerned, STOP and ask for help. The best place for this is the Ubuntu Forums.
This guide is designed primarily for users who have a dual boot that now want to fully escape Windows and go purely Ubuntu.
OS-Uninstaller Graphical Tool
A simple way to remove Windows (or any OS) is to use this little graphical tool: OS-Uninstaller.
Alternative: via gParted and GRUB update
There are other partition editors available, but GParted is this documentor’s favorite and is already available to you if you have an Ubuntu LiveCD. You can also use the GParted LiveCD.
Please note that although you can install GParted inside your Ubuntu installation, you will be unable to resize your root partition without a LiveCD since you cannot change a partition that is mounted.
Boot the Disc
Place the LiveCD into your CD/DVD drive, and reboot the computer. Each computer is different, but you may need to change your BIOS to have the system boot from the CD drive before the hard disk. Refer to your computer manufacturer’s documentation for this.
Run GParted and Locate Windows
On the Ubuntu LiveCD, go to System -> Administration -> Partition Editor. If you have more than one hard drive on your computer, choose the correct device from the drop down box in the upper right hand corner of the window. Your windows partition will most likely be formatted as NTFS and have a boot flag, which makes it easy to locate. Again, if you are unsure, don’t delete it!
For more details on partitioning, see HowtoPartition and its subpages.
Deleting the Windows Partition
Select the correct partition, either from the bar graph representation of your disk, or from the list, and press the Delete button at the top with the trash can icon, or right-click the partition from the list and choose Delete. Note that a Windows installation might use more than one partition; for example, Windows preinstalled on an Acer desktop might have a «hidden» (but not to GParted) recovery partition, a partition named «SYSTEM RESERVED», and one named «eMachines». In this case, you’ll have to select them all for deletion. Now if you are sure that you want to proceed, click the Edit -> Apply button to start the pending deletion operations.
Use the Newly Freed Space
After the deletion operation completes, you’ll have a section of unallocated space. Now, you can either format it as the filesystem type of your choice to use as a data partition (or something else), or you can resize an adjacent partition to use this space.
Resizing an Existing Partition
Right-click the partition that you want to expand into the empty space and select Resize/Move. You can use either the number sizing, or you can graphically drag the arrows on the visualization into the empty space (the numbers will adjust automatically). When you are finished, click the Resize/Move button, then Edit -> Apply in the GParted window. Again, read the prompt and click Edit -> Apply. The operation may take awhile, depending on the size of the partition, but DO NOT interrupt this process, or you risk losing everything on the partition you are resizing.
If your Linux installation lives on the extended partition (see HowtoPartition/OperatingSystemsAndPartitions), you will not be able to expand the main Linux partition into the space created by deleting the Windows partition. One solution is to
- create a new partition using the space left by the deleted primary partition (see Creating a New Partition below),
- if the new partition is smaller than the main Linux partition, resize the latter to fit the former (but only if the latter is not so full that data would be lost),
copy the data of the old partition to the new one (click on the old partition; Ctrl-C; click on the new partition; Ctrl-V; click Edit -> Apply) (had it been possible, resizing the old partition would also have involved copying and would have taken just as long),
reinstall GRUB2 to the new partition (see Grub2#Reinstalling GRUB2), and
Once you’re satisfied that this operation succeeded, use GParted again to delete the old partition and to create a new one in its place, or to expand the new main partition, or to just leave the unused disk space as it is, to be used later.
Creating a New Partition
If you choose to simply use the newly freed space as a new partition, select the unallocated space and click the New button (or right-click). Choose which filesystem you want, then click Add, then Apply, and Apply again.
Since you are not using Windows on this system anymore, ext4 is probably the best choice for your new filesystem. If you plan on sharing this drive with Windows (maybe you have Windows on another drive on this computer), NTFS or FAT32 would be better choices.
Further Operations
Edit GRUB
Once back in your install, you will probably want to remove Windows from your GRUB2 menu. Using root privileges and your favorite text editor, open /boot/grub/grub.cfg
Or for a terminal interface, run:
Now scroll down into the file to where it says something similar to
You can place a # in front of each line to «comment out» these entries. If you are comfortable with deleting the entries, you can also do that. After you you save and close, these entries will no longer be available at the GRUB menu.
Edit /etc/fstab
If you made a data partition, you can have it automatically mount by adding the correct entry to fstab, which you can edit using root privileges.
Or for a terminal interface, run:
You may also need to change UUIDs in your fstab file if they changed (perhaps due to partition resizing). To see the UUIDs for your partitions, run one of these two commands:
For more information regarding fstab, see Fstab.
Reboot
You can now reboot your system — go to System -> Quit -> Restart. Don’t forget to take out the LiveCD at the beginning of the boot sequence since you can’t remove it while the disc is being used and you don’t want to reload Ubuntu from it.
Other Resources
HowToRemoveWindows (последним исправлял пользователь knome 2013-12-14 11:22:16)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details