How can I remove Ubuntu without affecting Windows so I don't have to choose an OS to boot at startup?


This question appeared in my 'dashboard' as active but I've just realised it's from over 5 years ago - it looked active because Community has marked it for being moved. But whilst I'm here anyway I'll add a little to it:

@phoibos offers decent advice to answer the question asked and then points in the direction of 'you don't need to get rid of Ubuntu to get the functionality asked for'.

Removing Ubuntu and getting Windows to re-write the bootloader afterwards is an awful lot more hassle than just changing a couple of lines in the grub file located in the /etc/default folder.

  • Open up a terminal and type sudo nano /etc/default/grub

  • Change GRUB_DEFAULT=0 to GRUB_DEFAULT=saved

  • Add GRUB_SAVEDEFAULT=true on a new line below it.

From there you can press Ctrl + o to save your changes ('Write Out'), enter to accept the filename 'grub' and then Ctrl + x to exit.

If you prefer you can just press Ctrl + x once you've made your changes, y to accept the offer to save your changes and then enter to accept the filename.

  • When you run sudo update-grub to update your new grub adjustments, then the last Operating System that you successfully booted will be the default option.

So if you usually end up running Windows, then when you switch on your machine it will be the option highlighted in the grub menu. If you don't choose something else then it'll get on with booting it when the timer runs out (or you press enter).

Using the same method, you can also change the GRUB_TIMEOUT=10 to just a few seconds if you prefer to get on with booting your usual choice more quickly.

Keeping another Operating System on your machine may turn out to be surprisingly useful if something unexpected happens to your main system.

(This assumes that you can spare 15 - 20 GB or so on your storage device, although some of the lighter distros take up even less space even with a bunch of useful programs installed).

Also, Community, don't worry about deleting/moving this answer if you'd prefer - I've saved a copy in case something similar is asked again ;)


Related videos on Youtube

Author by


Updated on July 19, 2022


  • mayank
    mayank 21 days

    I installed Ubuntu 12.10 alongside Windows but now I want to permanently remove it from my computer as I find it quite uncomfortable to have to choose which OS to boot at startup time.

    How can I remove it without affecting my Windows system?