Unable to remove old UEFI entry

Probably I´m not using the proper command but I want to delete my old ubuntu uefi entry. I’ve tried:

sudo efibootmgr -b 0002
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0002,0003,0004,0005
Boot0000* Windows Boot Manager  HD(2,GPT,9c40cb23-a5f7-4674-b9fc-3d5a02e41278,0x1ddc60,0x5e0c4)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000064000100000010000000040000007fff0400
Boot0001* manjaro       HD(2,GPT,9c40cb23-a5f7-4674-b9fc-3d5a02e41278,0x1ddc60,0x5e0c4)/File(\EFI\manjaro\grubx64.efi)
Boot0002* ubuntu        HD(2,GPT,9c40cb23-a5f7-4674-b9fc-3d5a02e41278,0x1ddc60,0x5e0c4)/File(\EFI\ubuntu\shimx64.efi) File(.)
Boot0003* UEFI:CD/DVD Drive     BBS(129,,0x0)
Boot0004* UEFI:Removable Device BBS(130,,0x0)
Boot0005* UEFI:Network Device   BBS(131,,0x0)

What am I missing?

Seems like it.
I believe it should be

sudo efibootmger -b 0002 -B

Or I might just do it manually. (the following is not needed … but I’m leaving it here anyways)

I dont know where you ESP is mounted …

findmnt /efi

it might be /boot/efi (modern Arch recommendation is /efi)

Depending on where it is you might just

ls -a /boot/efi/EFI/ubuntu

You see it? Great.

sudo rm -r /boot/efi/EFI/ubuntu

After removing the entry you may want to run sudo update-grub.

2 Likes

Note that if you delete the efi variable and it reappears after reboot, you have one of those bioses that looks for files and creates entries automatically (Insyde UEFI on some lenovos for example). So you will have to delete both as posted above.

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.