How to keep your Boot EFI partition clean of old Linux bootloader folders

This tutorial shows how to delete bootloader folders of Linux distributions that you have deleted from a dual-boot system.

Imagine for a moment that you set up a Windows-Linux dual-boot system. Later, you deleted the original Linux distribution and installed another Linux distribution in its place.

The dual-boot setup still works beautifully, but traces of the old Linux distribution still exists on a partition of the hard drive reserved for bootloader folders on a UEFI system. That partition is what Windows called EFI System partition.

On Linux, I like to call it the Boot EFI partition because it’s mounted at /boot/efi. If you’re logged into the Linux side of such a dual-boot system, you can view all the bootloader folders on the Boot EFI partition, and delete any that are no longer needed.

Take, for example, the computer I used for Dual-boot Ubuntu 16.04 and Windows 10 on a PC with UEFI firmware and Triple-boot Linux Mint 17.3, Ubuntu 16.04, Windows 10 on a PC with UEFI firmware. It was previously used for a dual-boot setup between Windows 10 and Antergos.

Now that Antergos has been deleted, there was no point in keeping its bootloader files on the system, so I had to delete it – while logged into the new Linux side of the dual-boot setup.

And deleting old bootloader files from a Boot EFI partition is very simple. Just navigate to the /boot/efi/EFI directory, list its contents and delete the unwanted folder, using the commands shown in Figure 1. Just be absolutely sure that you do not delete the Microsoft folder. The same goes for the folder of the existing Linux distribution.

All Shutter features enabled
Figure 2: All Shutter features enabled

If you’ve used How to delete GRUB files from a Boot EFI partition in Windows 10 to perform the same operation from the Windows side of such a setup, it should be obvious that it’s much easier from the Linux side.

Leave a Reply