How to Safely Uninstall Ubuntu From a Windows Dual-Boot PC

Christian Cawley Updated 08-03-2019

You’ve installed Ubuntu on your PC alongside Windows in a dual-boot arrangement.


But for some reason, things didn’t go too well. Perhaps you ran into some bugs, or perhaps you just didn’t feel ready to migrate from Windows to Linux.

Now you’ve got a bit of a problem: a Linux partition on your PC’s hard disk drive, taking up space that you need for your Windows files and folders (or perhaps another attempt at dual-booting Linux).

In short, you need to uninstall Ubuntu from your PC. How can you do that safely, without losing data from Ubuntu or Windows?

What Is Dual-Booting Linux?

Linux and Windows dual boot grub menu

As a brief explainer, dual-booting is the act of installing two operating systems into separate partitions on a hard disk drive. This can be useful for migrating from one operating system to another (for instance, from Windows to Linux).


It’s also valuable if you use one OS for some tasks. (You might have a Linux PC at home but use Windows at work).

While a virtual machine is one way to enjoy multiple operating systems on one PC, dual-booting is more flexible. Both options have their strengths and weaknesses.

Be aware that you can go beyond dual-booting. If you had also managed to install macOS on your hardware, then you could describe this as “multibooting.” The same term applies to multiple versions of Windows or Linux, too.

Preparation: Back Up Your Files!

Ubuntu desktop file manager view


It doesn’t matter how long you’ve been using Linux. There will almost certainly be a couple of files you want to retain. The answer, of course, is to back these up.

How might you back up data on a Linux partition? One way is to use the standard backup tools found in Ubuntu How to Make Data Backups on Ubuntu & Other Distros How much sensitive data would you lose if your disk drive died? Naturally, you need a backup solution, but making backups in Linux can be tricky if you don't know what you're doing... Read More . Other Linux operating systems also ship with backup tools. You’ll also find backup utilities that can be installed from your distribution’s package manager.

You might also opt for a more straightforward solution. Installing the Dropbox client on your Linux OS and syncing your data to the cloud would be enough. Alternatively, resort to a removable USB drive.

It’s even possible to use the Linux file manager to copy and paste your personal files from Linux into the Windows partition. Ensure you save the data in an easy-to-find location, with a clearly labeled directory name, for ease of discovery.


Use the DiskInternals Linux Reader to access Linux data on your Windows partition

Should you find that things go wrong and you can’t boot into Linux to recover your data, you can use a Windows tool like DiskInternals Linux Reader to read the ext2 or ext3 file system and recover your files.

Given that we’re going to be deleting data from the HDD, for complete data safety, it’s also worth making sure that you have a recent backup of your personal data from the Windows partition.

Uninstalling Ubuntu: Remove the Linux Partition

Once you’re happy that you have retrieved the data you mean to keep from your Ubuntu partition, just delete it.


It really is that simple. Boot into Windows and open Computer Management. You’ll need admin privileges for this, so if yours is the main account on the PC, that should be fine. If not, you’ll need to make some changes to your account, or login as admin.

Next, right-click the Start button, and select Disk Management. Here, you’ll see your partitions listed. You’ll need to identify the Linux partition; you can double check this by using the DiskInternals tool.

You should also be aware of the partition size and be sure that this matches the size of the main storage device when you’re running Ubuntu.

Avoid deleting any partitions that you need!

Once you’re certain, it’s time to delete the Ubuntu partition. Right-click the partition and select Delete Volume.

Delete the Linux partition from Windows

This simple action will effectively uninstall Ubuntu from your PC. The GRUB 2.0 bootloader will also be gone, which means no more operating system selection screen.

However, it also means that there is no means to boot the remaining OS.

How to Restore the MBR (Master Boot Record)

To get around this, you need to restore the Master Boot Record, or MBR. You have a couple of options here:

  1. Use Windows to repair the MBR.
  2. Employ a third-party tool, such as Hiren’s Boot CD Hiren's Boot CD: The All-In-One Boot CD for Every Need Hiren's Boot CD is a Windows rescue utility that boots from CD or USB. It's a must-have for your PC repair kit for when Windows won't boot. Read More . This option is best if you’re not using Windows 10.

We’re going to focus on using Windows 10 to repair the MBR.

Begin by downloading the Windows 10 installation files. This is legal if you’re using a legitimate copy of the OS. Use this to create a bootable USB or DVD How to Legally Download Windows Installation Files for Free Windows can get seriously broken. What you often need to do is to install it from scratch. And we show you how to get legal installation files for Windows 7 through 10. Read More .

Next, insert the disc, restart the computer, and tap the correct key to enter the BIOS to change the settings. (This differs depending on the manufacturer of your computer). The aim here is to ensure that the computer boots from the Windows 10 installation disc.

Restart to boot from the installation disc and click Repair Your Computer. Next, select Troubleshoot > Advanced Options > Command Prompt. Here, we use the Bootrec.exe tool using the fixbbr command.

First, enter:

bootrec /fixmbr

This will clean things up. Follow it with:

bootrec /fixboot

FixBoot is used when a non-Windows boot record has been removed.

At this stage, you can finish off with:

bootrec /scanos

This command scans the HDD for suitable operating systems. If you’re using Windows 10 alongside another Windows OS, it will be detected here. If you’re having problems with this, try

bootrec /rebuildbcd

At this point, you’re done. But if Windows doesn’t boot when you exit the command prompt and restart your computer (remembering to reselect the original boot disk in the BIOS), then you’ve got problems.

You can fix this by reinstalling Windows 10, but first try the recovery partition. This is a portion of your Windows 10 hard drive that is dedicated to recovering your PC.

Reclaim or Reuse the Free Space You Now Have

You’ll now have a chunk of free space. To use this, it will need partitioning and formatting.

If you don’t know how to do this, simply run Disk Management as described above. Select the empty space, right-click and choose the New Volume… option that suits your requirements.

Alternatively, right-click the volume next to the empty space, selecting Extend Volume to increase the size of the partition. This video will help:

Reclaimed by Windows, this space can now be accessed via a new drive letter. It’s available for whatever you want to store on it: personal data, games, videos, or anything else. Everything is back to normal!

Still need to use Linux from time to time? Why not install Linux inside Windows A Quick Guide to Linux Bash Shell in Windows 10 You can now run Linux on Windows. Learn more about Bash on Windows, from how and why you should install it, to hidden features you probably didn't know about. Read More using the Windows subsystem for Linux software in the Microsoft Store? Or, take a look at how to disable UEFI secure boot to dual boot any system How to Disable UEFI Secure Boot to Dual Boot Any System UEFI can interfere with installing a second OS. Here's how to disable UEFI Secure Boot and dual boot any operating systems you like. Read More .

Related topics: Dual Boot, Linux Tips, Ubuntu.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

    August 2, 2019 at 8:05 pm

    great tutorial and step by step instructions. Eurica! It really worked.

  2. Muhammad Sufyan Malik
    September 29, 2018 at 9:29 am

    I have a GPT partition not MBR, Then?

  3. Ashutosh Tiwari
    July 9, 2018 at 5:56 am

    Fixboot access denied... How to do now...

  4. crash
    May 7, 2018 at 7:56 am

    thanks for the advice, it gone done with with ease. I used mini partition partition pro ; delete partition and rebuild mbr in one click, worked like a charm. saved the day, thanx again.

  5. Rocket
    March 19, 2018 at 12:56 am

    I really hate it when other people suffer at the hands of those equipped with just enough information to be dangerous. So Christian, if you would like to somehow repair your credibility, and eliminate all the hate comments you will likely get in the future, you need to update this article and do it fast. First thing you need to address is UEFI/EFI since this is the world we live in. We have both EFI and Legacy systems, you just "assumed" everyone is using a legacy system. People with UEFI systems are going to hate you for either 1. screwing up their system with this generic advice you give without enough details to be precise and accurate, or 2. hate you for such a long drawn out useless and needless process. Why? because on a UEFI system all a user has to do is boot into their ubuntu/linux OS and pull up the terminal, with root priviledges (sudo) cd to /boot/efi/EFI and sudo rm -rf ubuntu then reboot their system which will immediately boot into windows again. The user can also use lsblk to see which partitions they want to delete while they are still in their ubuntu OS by identifying the (root) "/", "/home" and "/swap" partition sizes and labels such as sda4, sda5, sda6 that they can then use to identify in the windows disk management utility as disk 0 (partition 4), disk 0 (partition 5) etc. and delete those volumes to reclaim the space. Yes they do match up. what a god aweful waste of time downloading and creating windows media and repairing MBR's and so on...

    • Shubodh
      June 6, 2018 at 10:26 pm

      Oh man, I'm that guy. Not just this dude, I hate lot of people on the net who just assumed that I am using Legacy. I'm pretty sure I messed up my laptop, thanks to these people. I'm struggling to get things right, please help.

      Look, I understand what you say. but how do I execute the procedure you (Rocket) described if I am not even able to login into Ubuntu. PLEASE HELP. How do I format Ubuntu directly? I'm not able to do it from windows, I deleted the partition, but now when I extend the windows disk, it gives the error 'not enough space...'

      For the whole story, I basically followed a tutorial for Ubuntu installation by a person like this, who make such assumptions, which again didn't work out for me. Basically I screwed up my laptop in every way possible, thanks to these people.

    • Garrett
      October 4, 2018 at 6:46 am

      With Dell Inspiron 3268, in the BIOS there is an option to go to legacy - wo that option, closing to boot from a USB or CD would be pure happenstance... Thankfully, with this option you can save your butt.

  6. Vineeth
    January 28, 2018 at 12:41 pm

    On startup I get "minimal bash like line editing is supported.

    But I can boot to windows if press f1 after pressing start button, and existing from the system information.

  7. Jayant Isswani
    January 19, 2018 at 12:14 pm

    using scanos and rebuildbcd gave no of windows OS as 0
    But Windows still successfully boot

  8. Thomas Wigley
    January 17, 2018 at 9:39 am

    Remember to select command prompt and not the options on screen. Also ignore windows packages found =0. Just restart and all ok. Awesome help. Thankyou.

  9. Sumeet
    January 16, 2018 at 12:55 pm

    Sry is it necessary to repair mbr

  10. Sumeet
    January 16, 2018 at 12:53 pm

    After deleting partition of Ubuntu is it necessary to repair windows

  11. Chipa
    December 15, 2017 at 1:04 pm

    It says access denied when i get to "bootrec /fixboot". Please help!

  12. AlexLava
    December 9, 2017 at 8:52 am

    Yeah, very safely. And now I have no Operating System...

  13. Advent8
    October 31, 2017 at 10:15 am

    LOL, easy as hell. Thanks for tutorial!

  14. Angry
    October 7, 2017 at 8:39 am

    What the hell! You telling about getting windows installation files or os files downloaded after deleting the partition and restarting ? How to do that from grub rescue now! You should have written about getting those files first..! You just cost me my PC!

    • Alec
      December 29, 2017 at 5:51 pm

      Just find the key to select the boot device, then select windows boot manager. Now you can put the tool onto the pen drive.

  15. Clinton
    August 25, 2017 at 6:20 pm

    Perfect success

  16. Sanij Shrestha
    August 18, 2017 at 10:51 am

    Hi, I have a toshiba satellite s50-B-12u. I uninstalled Ubuntu Grub boot loader partition from windows command using certain commands and after i reboot it wont boot showing "no bootable device-- please restart system."
    Then I tried to boot into Bios by pressing F2 but it is just showing toshiba Logo and keeps on restarting. If I press F12 i can go to boot order and if i select bootable usb drive it shows the same message "no bootable device -- Please restart system". Is it that my motherboard is damaged?? I donot think so as I can turn on the laptop or maybe the bios chip is corrupted? Anyone came across similar issue??

    Please Help me, U can write me on my gmail id as I have no laptop to use for now.

  17. S.Govindaswamy
    August 9, 2017 at 4:30 am

    After uninstalling Ubuntu Swap partition is not seen by Windows. How to recover and use this

  18. Dave Goodacre
    May 15, 2017 at 10:41 am

    I successfully loaded and used for 3 years Ubuntu 12.04. I went away for a month and on return, found that I could not load the Ubuntu, at first I got a brief grub message then nothing.
    I am not any expert with these things and am 'flummoxed' I want to replace the 12,04 with a more uptodate modle, but am scared of losing info fromthe XP side - any advice would be gratefully accepted.

  19. Bajiru
    May 8, 2017 at 1:31 pm

    This guide is very simple, and also recovering the MBR is simple, but I had a problem with Windows activation.

    I first installed Ubuntu 13.10 Saucy Salamander dual-boot with Windows 7 Starter, but the Unity Desktop Environment wouldn't start. I tried some commands, but it didn't work. So, I deleted the partitions, fixed the MBR (with a Windows Repair Disc created by a Winows feature which allows to do so), but when I restarted, my Windows installation was deactivated. I searched for my product key, I re-installed it and it was giving me an error. I searched for this on Microsoft and it said something like this: "The server did not recognize the key, but it was correct. Please btry to re-install it." I tried so (almost 20 times by now) and it didn't work AT ALL. I installed Ubuntu 12.04.5 LTS Precise Pangolin as dual-boot again (and it thankfully worked well). 2 weeks ago, I installed Xubuntu, found a program which made my Windows installation recognizable by Microsoft servers. It installed a different key. I restarted and it worked! I got my Windows back! However, it was a virus(infecting my PC with adware, not destroying Windows files) and I managed to delete it. I did the same now with deleting my Xubuntu installation, but I do not want to start this craze AGAIN and infecting my PC with a virus.

    So, will it work now or not? Also I'm going to install Ubuntu with Wubi. Will this install GRUB?

    Thanks in advance,

  20. Paul
    March 27, 2017 at 10:31 pm

    I'm unable to delete the Linux partitions from Disk Management. Any way to get around this?

    • Christian Cawley
      March 29, 2017 at 7:33 am

      WHat's the exact error message, Paul?

      You may need to run DISKPART in a command prompt as admin, but without full details I can't give you a definitive answer.

  21. ppa
    February 22, 2017 at 9:50 am

    HOw do I get a disk with Windows?

  22. P. Oed
    December 26, 2016 at 6:11 pm

    As long as Linux is so DOS like it will never be fully realized. Linux for Geeks and even geeks don't understand it; just linux elitist, and they enjoy keeping it to themselves for a sense of power. Power over nothing is still nothing.

    • Christian Cawley
      March 29, 2017 at 7:32 am

      Doesn't explain the success of the Raspberry Pi...

  23. Anonymous
    September 28, 2015 at 7:54 am

    also, worth creating a Linux boot disc too (just in case you need to go back).

  24. Anonymous
    September 28, 2015 at 7:52 am

    Yes, the partition tool is used to get back the space.

    I actually created a windows 7 boot disc first, because when the partitions are deleted a boot disc is required (since the PC does not have boot instruction at this point).

    I then did the upgrade from win7 to win10.

    One could directly go to win10, but to be safe make sure a win7 boot disc is also created.

    Hope this helps.

  25. Anonymous
    August 8, 2015 at 7:45 pm

    Ubuntu with windows 7... migrating to windows 10 (so one operating system).
    Followed instruction & works.

    2 ubuntu partitions deleted.
    windows 10 iso disc created from windows website.
    partition magic (from used to resize windows partition.
    FYI. the free version was sufficient.

    Took time, but worked well..!

    • Anonymous
      September 28, 2015 at 7:25 am

      Hey doefcoe, so first i create the win 10 iso disk from windows website, then delete the ubuntu partitions? and then i use the partition tool after everything is done?

  26. Anonymous
    August 7, 2015 at 5:00 am

    Thanks a lot :)

  27. Anonymous
    June 5, 2015 at 6:33 am

    I do not have a Windows cd or dvd . Is there any alternative

    • BillV
      March 7, 2016 at 4:27 am

      I realize this is an old post now, either you found the alternative or moved on to something else however, for others wanting to know same thing, you can create a multi-boot thumb drive from that will have the DOS recovery tools in it that you can restore the MBR without needing the original Windows install CD or DVD.

  28. Ssejjemba Daniel
    May 21, 2015 at 1:23 pm

    My pc will not load the windows cd it keeps warning no operating system found and then goes to grub recovery

  29. Pastnormal
    April 30, 2015 at 11:11 am

    This worked for me. I uninstalled Linux Mint from a dual boot with Windows XP. Now I'm going to upgrade to Windows 7, and reinstall Mint on another PC.

  30. MAK
    April 14, 2015 at 1:35 pm

    thanks.IT worked for me

  31. Wouter11234
    March 1, 2015 at 8:52 am

    Thanks! It works :D

  32. RH
    February 14, 2010 at 8:53 am

    I have deleted that partition and then reboot. Then, the screen to select among different OS (Ubuntu, WindowsXP) did not come and my PC automatically booted with XP(as it boots when WindowsXP is the only OS)!! No problem came. Though I did not do that thing(fixmbr....). Now I am working in XP. Has Ubuntu been fully uninstalled??

    • Remmy700P
      January 26, 2015 at 3:39 am

      No. GRUB is still installed in place of the Windows bootloader.

  33. Jesse
    February 8, 2010 at 5:50 pm

    Ubuntu gets more difficult to manage for noobs as it ages. It should be the other way around. I can't even get 9.10 to do dial up much less use my aircard. I'm over it.


  34. MP
    February 7, 2010 at 8:23 pm

    I tried the instructions offered. However, they did not work as expected. I deleted the partition with Ubuntu, but when I restarted the laptop (HP Pavilion 9700 with XP home SP2) with the recovery DVD, it immediately re-formatted my hard drive and is doing a clean installation of XP.... Oh well, I don't care about the data lost, but it's a real pain to bring the computer up to date. This was not a good way to uninstall Ubuntu and leave the XP alone....

  35. Jesse
    February 3, 2010 at 1:51 pm

    This didn't work for me... at least it didn't take care of the grub problem. Ubuntu still shows up. This is a problem because there is nothing there and if I try to reinstall ubuntu it will not allow me to boot in to xp.

    • jymm
      March 30, 2017 at 11:16 am

      There are always things that can go wrong when doing these kinds of processes. That is why the first step in his tutorial is "back up".

  36. Jim
    January 5, 2010 at 11:49 am

    Hi all,

    I have windows 7 instead of Vista, will the process be the same as listed here?
    I have the installation disc from MS. Please let me know, if true, then, I will try it.

  37. qasrani
    December 14, 2009 at 2:06 pm

    Hi there,
    After trying to find a solution about what I am supposed to do in following situation:
    I have Acer Aspire 5315 laptop with pre-installed windows Vista Basic. I put Ubuntu on its top. All went messed up if I talk about booting. System restoring to factory default, ubuntu and windows booting, all comes on one screen. I have already once restored my system to factory defaults but as I do not have a windows CD or DVD seperatly (I got hard drive as recovery media), I was lost.

    I went to boot options by pressing F8 and there I choose system recovery. In system recovery, I went to command prompt and get
    done but
    did not worked. At least now there is no more option for operating system installations but still I can not figure out anything how to remove Ubuntu from system. Any help I can get from here?

    Summery: I want to restore my laptop to factory defaults. I do not have any CD or DVD for windows recovery but I have a hard drive partition for the purpose. Ubuntu mixed up my partitions so restoring the factory default does not work.

  38. cookielover
    October 25, 2009 at 1:55 pm

    I did this once differently. I couldn't find my Windows setup CD, so I went and got this software called MBRfix ( to restore the MBR. When I restarted, I automatically booted into Windows. THEN I deleted my Ubuntu partition.

    And then I reinstalled it. ;)

  39. dp
    October 25, 2009 at 5:11 am

    Kernel schmernel. This is a helpful explanation of how to get Ubuntu off my laptop.

    • Ant
      October 28, 2009 at 2:38 pm

      It certainly is. Thanks, Varun! If I'd had help as good as this when I was installing Ubuntu, maybe I wouldn't now need help UNinstalling it...

  40. Noah
    October 24, 2009 at 4:10 pm

    Correction - Linux is a kernel which lots of great OS's use. Please correct your error. I don't want to have to re-inform the masses.

    • Albert
      October 25, 2009 at 12:31 am

      Linux IS an operating system. If you are unclear on this point I suggest you talk to RedHat, Ubuntu, or even Microsoft. They will explain it to you. Don't Let Stallman or his minions confuse you. Without the Linux "kernel" their is no Linux operating system. This myth of GNU/Linux is just that, a myth! Their was never, and will never be a GNU operating system. The Linux kernel is what makes linux, Linux!

      • Noah
        October 25, 2009 at 5:46 am

        No, it's not a operating system. Those which believe so are wrong. Ubuntu and Redhat USE the Linux KERNEL, but they are NOT Linux. They are simply based upon it.

        • MP
          February 7, 2010 at 8:17 pm

          Ubuntu is an operating system.