Deleting EFI Boot Entries

It is not UNIX’s job to stop you from shooting your foot. If you so choose to do so, then it is UNIX’s job to deliver Mr. Bullet to Mr Foot in the most efficient way it knows.

Recently, I changed my HDD with SSD on my laptop (I was feeling adventurous, lol ...). The MBR was still pointing to old entries and caused problem. You might also find this post useful if let's say, you had dual boot between Windows and Linux, and later using Windows you have formatted the partition where once you had Linux installed. Just like my article on Deleteing MBR, this solution also uses Live OS, so that you can be in and out without making any changes to the actual OS.

For this purpose, we'd be using efibootmgr in Linux, Ubuntu Linux to be specific. For Windows, you can use BCDEdit, tool.

As you can see, we have BootCurrent, Timeout, BootOrder and the Boot Entries listed. This tool couldn't be more easier, and more self-explanatory.

Now let's say I want to delete an entry for grub, whose identifier is 000A. So for that, I would issue following command. Feel free to checkout documentation or man page for more details.

sudo efibootmgr -b 000A -B

Eventually, I reached to the point, where I did not have any unwanted entries:

of