Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I searched the Internet for instructions on how to remove GRUB, but the only thing I could find was using a Windows DVD to "repair" the system. I previously had a Windows/Linux doal-boot and removed Windows (GParted + Boot-Repair), but GRUB is still installed with only one entry: the Linux one.

How can I uninstall GRUB and directly boot on a Debian-based OS?

share|improve this question
Support for booting Linux directly without using a boot loader was removed 13 years ago during the 2.5 releases. It was removed because at the time it already suffered from major drawbacks compared to using a full boot loader. – kasperd Feb 8 at 12:32
@kasperd Well, now it's back, via EFIstub. – underscore_d Feb 8 at 12:37
@underscore_d Might be. I don't know enough about EFI to say whether the two are comparable. – kasperd Feb 8 at 13:00
up vote 30 down vote accepted

You cannot uninstall GRUB. As your installation stands, GRUB is necessary to boot Ubuntu (that's why it's called the bootloader). Every OS has a bootloader, and every OS needs that bootloader to boot (lots of booting :P).


As people in the comments have pointed out, there are alternatives to using GRUB. However, there is no reason to switch to one, since you just want the GRUB screen to be hidden. I believe that all of the other bootloader options work in similar ways, so you shouldn't worry about installing something else.

I believe what you want to do is hide GRUB. This is possible, and quite easy. Press Alt+F2 and paste this before hitting Enter: gksudo gedit /etc/default/grub.

A text-editor window will open, showing something like:

GRUB_DISTRIBUTOR=”`lsb_release -i -s 2> /dev/null || echo Debian`”

Remove the two #s before GRUB_HIDDEN_TIMEOUT and GRUB_HIDDEN_TIMEOUT_QUIET. Save the file, open a terminal and run sudo update-grub. Reboot and you should have no GRUB window show up.

Also set GRUB_HIDDEN_TIMEOUT to 1 to avoid potential problems. GRUB will flash by, but it won't sit there for 10 seconds.

If you want, you can do this graphically.

Run these commands in a terminal window:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer 

sudo apt-get update

sudo apt-get install grub-customizer

Once that's done, search for and open GRUB Customizer.

Go to the General tab and deselect show menu and look for other operating systems. Click the refresh button (blue circular arrow near the top right) and then click save.

Reboot and see no bootloader.


share|improve this answer
"GRUB is absolutely necessary to boot Ubuntu". Absolutely false. Google Debian UEFI stub, which, yes, Ubuntu also inherits. – underscore_d Feb 8 at 2:33
@underscore_d Well, yes, but I don't think the OP is replacing GRUB any time soon. I can reword it. – Zacharee1 Feb 8 at 2:38
If I'm not mistaken, if GRUB_HIDDEN_TIMEOUTis set to 0, by default it will be 10 seconds (for obvious security reasons). Better to keep a very small value like 1 So that grub flashes for a second. – Ron Feb 8 at 6:10
+1 for @underscore_d , this answer declare wrong things. You think that the OP is not replacing GRUB any time soon, but how can you be so sure? It seems that he pretty want to get rid of the overload of GRUB. Yes, putting a small timeout will help, but saying you can't get rid of it is really not a helpful answer for those (like me) who are really trying to get rid of it for security purposes and whatnot. – Dolanor Feb 8 at 9:45
@Dolanor that wasn't the question though. This person just doesn't want to see the boot loader. Read it again. They don't want to replace GRUB, they thought getting rid of it was how they could prevent an OS selection window from coming up. If this question had been about getting another boot loader, then my answer would have to be different, but it is clear OP just doesn't want a window to appear on startup, and doesn't really care what makes their Os boot. – Zacharee1 Feb 8 at 11:19

All the other answers start good, advising you that GRUB is usually there whether you see it or not, you probably shouldn't start taking random potshots at it, and how to restore your system to the 'hidden GRUB' you (presumably) previously enjoyed.

However, they end up going wrong - in making blanket statements that GRUB is always required, when this is just not the case. I guess they're oversimplifying on the assumption that your (XY) question is really 'How do I make things how they were before?', rather than specifically 'How do I destroy GRUB?'. But my concern is that, if not qualified, this response is counterproductive: rather than merely omitting to mention the alternative, they're outright stating there is no alternative.

So, for reference, I can say from everyday experience that Debian now ships with a UEFI stub compiled into its kernel, enabling the kernel to be directly booted without any middleman by your firmware, assuming it is a competent EFI-compliant firmware. This is not esoteric knowledge, though neither is it a default. Anyway, unsurprisingly, it looks like this ability is inherited and perfectly usable by Ubuntu, e.g.: How to boot load the kernel using EFI stub (efistub) loader?

But again, though this technically matches your question, you might not have been asking what you thought you were asking! You're best to combine this with the other (correct!) parts of the other answers, and decide whether (hidden) GRUB or EFI suits you. The usual disclaimers apply: Don't mess with EFI if you're not technically confident yet. Treat any thread like that link as an example only: customise exactly to the needs of your system. Enjoy!

share|improve this answer
You're right, underscore_d, but it goes even further than that. If the machine is booting in BIOS/CSM/legacy mode, alternatives to the default GRUB 2 include LILO, SYSLINUX, and GRUB Legacy; and if it's booting in EFI mode, alternatives include ELILO, SYSLINUX, GRUB Legacy, and the EFI stub loader, with the last of these being selectable via the firmware's built-in boot manager, gummiboot/systemd-boot, rEFInd, or even (awkwardly) rEFIt. In sum, the number of boot loader (and boot manager) options is pretty large. Switching from GRUB 2 may not be Magix's best option, but alternatives do exist. – Rod Smith Feb 8 at 3:13
@RodSmith Excellemt points! Maybe you should post that as an answer, as it probably deserves more votes than mine :) I was writing mostly from experience only: GRUB is the most popular, and I went straight from that to EFIstub. I have used rEFIt to repair my EFI (it's buggy...) and heard briefly about the rest, but they didn't cross my mind yesterday (too tired!) – underscore_d Feb 8 at 8:54

I am not knowledgeable enough to answer weather GRUB is required or not, but if your goal is to hide GRUB completely , I have a better solution than the accepted answer.

In order to achieve the fastest possible boot, instead of having GRUB wait for a timeout, it is possible for GRUB to not print the menu, unless the Shift key is held down during GRUB's start-up. This allows you to quickly boot to your default OS, but provides the flexibility to boot into another installed OS when the need arises infrequently.

In order to achieve this, you should add the following line to /etc/default/grub:


Then create this file in '/etc/grub.d/' named 31_hold_shift, make it executable, and regenerate the grub config file:

chmod a+x /etc/grub.d/31_hold_shift

That should do the job!

Find more GRUB Tricks here.

share|improve this answer

Do not try to remove grub, it is used as the bootloader for Ubuntu, just like the Windows mbr, which you just do not see.

You could try to install the program grub-customizer, which lets you define different settings for grub in a simple GUI. You could set the timeout to 0 and tell it to always boot the first entry, so you will directly boot Ubuntu without further input.

I believe this is also what happens automatically when you install Ubuntu as the only OS.

share|improve this answer
GRUB might be the default, but it is by no means required. – underscore_d Feb 8 at 2:33
Please, stop telling people that grub is an absolute necessity. Before EFI, a bootloader was totally a necessity, but since EFI, you don't need them anymore. The Linux kernel has a way to be booted directly from EFI, without grub, without lilo, without rEFInd and others. And by the way, mbr is not a bootloader, it is just a table for partition to point to to find the bootloader. – Dolanor Feb 8 at 9:49
A boot loader is required with either BIOS-mode or EFI-mode booting. EFI provides its own boot manager, which enables selecting what to boot; but a boot loader (which transfers control to the kernel) is still required. Where it gets a little dicey is that the EFI stub loader turn the kernel into its own EFI-mode boot loader, but technically it's still a boot loader. GRUB 2 is just one of several boot loaders available, but it is the default used by Ubuntu. – Rod Smith Feb 8 at 15:20
Oh okay, I was not aware of this. Thanks for clarifying. My reasoning was that the inquirer should not simply seek to remove grub, possibly ending up with an unbootable system, since this was not the point of question. Instead, I tried to make clear that the wanted result can be achieved by simply changing the grub settings. ;-) – Prototype700 Feb 10 at 1:54
@RodSmith : Mmhh. I didn't know that the UEFI wasn't considered as a bootloader. I knew about the stub loader, but didn't it was the actual bootloader. Making things clearer. Thanks. – Dolanor Feb 15 at 22:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.