Cleaning up `/efi`

I recently converted from grub to systemd-boot after the whole debacle. This is how my /efi/EFI directory looks now.

EFI
├── boot
│   └── bootx64.efi
├── EndeavourOS
│   └── grubx64.efi
├── Linux
└── systemd
    └── systemd-bootx64.efi

I wanted to know which one of these are safe to delete. I guess the empty Linux folder and the EndeavourOS folder with only grubx64.efi should be fine.

You can delete the EndeavourOS directory. I would leave the rest.

boot is the fallback entry, systemd is your actual bootloader.

1 Like

The empty Linux folder can be deleted too, I presume?

Sorry I don’t have an answer, but I have this as mine as well when going from grub to sysemd-boot

[scott@EndeavourOS ~]$ tree /efi/EFI
/efi/EFI
├── boot
│   └── bootx64.efi
├── endeavouros-1063
│   └── grubx64.efi
├── EndeavourOS-grub
│   └── grubx64.efi
├── Linux
└── systemd
    └── systemd-bootx64.efi

5 directories, 4 files
1 Like

I think that directory is used for legacy firmware implementations that require it. I would leave it since it isn’t taking up any material space.

1 Like

Understood. I just have this weird thing about deleting unnecessary stuff. I’ve gotten myself in pretty bad situations in the past lol.

1 Like

Is it just as simple to remove the files as:

sudo rm /efi/EFI/endeavouros-1063

sudo rm /efi/EFI/EndeavourOS-grub

I assume not using grub anymore, it’s safe to delete both files in this manner? I don’t need to rebuild anything after removing them or do I?

It should be rm -r instead of rm as we’re deleting directories. And simply deleting the EndeavourOS folder worked for me (i.e. I successfully rebooted) so should be fine.

2 Likes

Nope. Those are unused EFI entries.

You might also check efibootmgr and see if there are matching unused entries you need to remove from there as well.

Yeah this was actually mentioned somewhere in your grub to systemd-boot guide thread I believe, so I was able to do that earlier, I just wasn’t aware that there was more to potentially remove. But it’s all good to learn a little bit more today, thank you.

Since you mentioned this, I did have this issue of my system still trying to boot into grub even after removing it, causing failure. Had to manually remove the entry from efibootmgr.

It was a issue for some users that even with the grub to systemd-boot change that not all BIOS would update or “honor” the new boot order (or something to that effect), so like in my case, after switching, I had to reboot into my BIOS and change the boot order. Then after a successful reboot, I had to use efibootmgr to then find and delete the entries of grub that were left behind and all has been well since then.

1 Like

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