Ubuntu – How to remove Ubuntu from the UEFI boot options?


I have a Gigabyte motherboard. GA-Z77X-UD3H to be specific.

I recently installed Ubuntu and deleted it again, but it still shows up on the UEFI boot option even if I removed all hard drives connected to the motherboard.

So NO hard drives, even CD/DVDs, USB drives connected and I still see the Ubuntu boot option. Any ideas/suggestions?

Best Answer

Boot a Linux emergency disc in EFI mode (the Ubuntu installer in its "try before installing" mode should work). You can then use the efibootmgr utility to delete the unwanted entry. You'll use -v to view the list of options and then a combination of -b and -B to eliminate the ones you don't want:

$ sudo efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,0003
Boot0000* rEFInd Boot Manager   HD(1,28,96000,bc34b60c-6611-492f-99b0-d2c37bd77f48)File(\EFI\refind\shim.efi)
Boot0001* fedora    HD(1,28,96000,bc34b60c-6611-492f-99b0-d2c37bd77f48)File(\EFI\fedora\grubx64.efi)
Boot0003* ubuntu    HD(1,28,96000,bc34b60c-6611-492f-99b0-d2c37bd77f48)File(EFI\Ubuntu\grubx64.efi)
$ sudo efibootmgr -b 3 -B

Some EFIs provide the ability to do this in their own user interfaces, too, but details vary greatly from one to another.

Related Question