How to delete old OS entries in your boot menu.

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
4,425
Reaction score
4,642
Credits
41,821

Cleaning Up UEFI Boot Entries: Why It Matters and How to Do It

If you’ve installed multiple operating systems over time—different Linux distributions, Windows, or experimental builds—you might notice that even after wiping your disks, old boot options still appear in your BIOS/UEFI menu. Why does this happen? And why should you care?

Why Old Boot Entries Persist
UEFI stores boot entries in non-volatile firmware memory, not on your hard drive. So when you reformat or replace a disk, those entries remain. This can lead to:

Confusion: Seeing Ubuntu or Windows listed when they’re long gone.
Boot Failures: The firmware may try to boot an OS that no longer exists, causing delays or errors.
Messy Boot Menu: Harder to manage and troubleshoot.

How to Fix It
The solution is simple: delete the stale entries and organize the boot order.

Step 1: List Current Boot Entries
On Linux, use efibootmgr:

Code:
sudo efibootmgr

You’ll see something like:

Code:
BootCurrent: 0001BootOrder: 0001,0002,0003
Boot0001* Fedora
Boot0002* Ubuntu
Boot0003* Windows Boot Manager

Step 2: Delete Unwanted Entries
To remove Ubuntu (Boot0002):

Code:
sudo efibootmgr -b 0002 -B

Step 3: Rearrange Boot Order
Set Fedora first, Windows second:

Code:
sudo efibootmgr -o 0001,0003

Alternative: UEFI Firmware Menu (When Available)
Many modern systems let you manage boot entries directly in the BIOS/UEFI interface under Boot Options or Boot Maintenance Manager. You can delete old entries or restore defaults.

However: Not all firmware supports this. Some systems only allow changing the boot order, not removing entries. If that’s the case, use the Linux method with efibootmgr.

Wrap-Up
Cleaning up UEFI boot entries keeps your system tidy and prevents boot errors. It’s a quick fix that every multi-OS tinkerer should know.
 


Thanks for the tip works like a charm :)
 
I don't have any old Boot entries but handy to know.
1768347047530.gif

1768346870950.png
 
@dos2unix

brian@brian-desktop:~$ sudo efibootmgr
[sudo] password for brian:
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0002,0005
Boot0000* Ubuntu HD(1,GPT,abf4738b-cc6d-4c16-a733-f8b3ce6a27e3,0x800,0x100000)/File(\EFI\UBUNTU\GRUBX64.EFI)
Boot0001* ubuntu HD(1,GPT,abf4738b-cc6d-4c16-a733-f8b3ce6a27e3,0x800,0x100000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0002* debian HD(1,GPT,66054ee4-331b-4b60-abfd-b84c75100ec0,0x1000,0x8f000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0005* debian HD(1,GPT,66054ee4-331b-4b60-abfd-b84c75100ec0,0x1000,0x8f000)/File(\EFI\DEBIAN\GRUBX64.EFI)0000424f
brian@brian-desktop:~$



So, in the above output, 0001 is the current boot

Pic of grub screen, below:
where gigi.jpeg


bkpboot defaults back to LM22.3 and boots to 22.3

fbx64 also defaults back to LM22.3 and boots to 22.3

mmx64.....goes to:....
MOK.jpeg


.........and I do not know enough about MOK to proceed from there

The initial grub screen showed LMDE on top, and Linux Mint 22.3 underneath that......meaning lmde booted first if I was not ther to arrow it down to 22.3
I used the Advanced options method to put LM22.3 on top, and the pics above are taken after doing that.

edit to add:
Did a bit of tinkering et etc.......etc...

and:
brian@brian-desktop:~$ sudo efibootmgr
[sudo] password for brian:
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000
Boot0000* Ubuntu HD(1,GPT,abf4738b-cc6d-4c16-a733-f8b3ce6a27e3,0x800,0x100000)/File(\EFI\UBUNTU\GRUBX64.EFI)
brian@brian-desktop:~$
 
Last edited:
The grub screen now:
(these are both taken after running boot repair in Live mode on a LM22.3 usb stick)

IMG_3390.jpeg


The Advanced options now
IMG_3391.jpeg
 
@dos2unix ,

Therefore, my question is: how to get rid of the below rubbish: There is only 1 OS on the pc.

brian@brian-desktop:~$ efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000
Boot0000* Ubuntu HD(1,GPT,abf4738b-cc6d-4c16-a733-f8b3ce6a27e3,0x800,0x100000)/File(\EFI\UBUNTU\GRUBX64.EFI)
brian@brian-desktop:~$



2026-01-16_11-08.png
 
Last edited:
Therefore, my question is: how to get rid of the below rubbish: There is only 1 [COLOR=revert-layer] OS[/COLOR] on the pc.

We are kind of mixing two different things here. The BIOS boot menu is not the Grub menu, although they can overlap a little.

If someone is seeing multiple OS entries in their GRUB menu (not the UEFI menu), they need to...

Check /boot/grub/grub.cfg (auto-generated, don't edit directly)
Look at /etc/grub.d/ scripts and /etc/default/grub configuration
Run sudo update-grub (Debian/Ubuntu) or sudo grub-mkconfig -o /boot/grub/grub.cfg (other distros) to regenerate the menu
Use tools like grub-customizer if they want a GUI approach
Manually edit /etc/grub.d/40_custom for persistent custom entries

I would start with these.
 
As it turns out, via a lousy arrangement on lkinxmint.com's part in 'engineering' an auto upgrade arrangement for Linux Mint 22.2 to LM22.3 (long story...but in a nutshell, the mirrors involved in the upgrade screwed up in spades)
....so, as a result of the above debacle, a totally fresh install took place. Anything related to my blurb above is gone !

That fixed it !

Thanks for the help anyway, Ray.
 
We are kind of mixing two different things here. The BIOS boot menu is not the Grub menu, although they can overlap a little.

Quite so, I failed to notice that properly.

I'll talk with Brian about carving off some posts as a separate thread, which he could then mark as Solved, since he has fixed the discrepancy. Then I'll come back here and clean up my post.

Cheers

Wiz
 
Hello, I hope nobody minds me hijacking an old thread but it seems like the best place for my question.

This is what I started with that needed cleaning up:

Screenshot_efibootmgr.png

...since I can't get the interface to cooperate with adding another pic I'll just post it in a continued post reply.
 
Hello, I hope nobody minds me hijacking an old thread but it seems like the best place for my question.

This is what I started with that needed cleaning up:

View attachment 31364
...since I can't get the interface to cooperate with adding another pic I'll just post it in a continued post reply.
and this next picture is what I had after using the efibootmgr in the terminal:

Screenshot_efibootmgr02.png

But there are still questions....

What are the listings for 15 and 16 and how do I tell which "umbuntu" is Mint and which is not?
 


Follow Linux.org

Members online

No members online now.

Top