How to completely erase an os ?, UEFI

Hello,

How can I safely remove an operating system in UEFI?.
Previously when I didn’t have UEFI in my pc I only worried about deleting the partition with Gparted, but now I see that after to eliminate the system it is still marked as existing in the BIO boot section. Do I explaining myself well?.

Thanks for any comments.

I simply format the drive then in BIOS press Delete on the leftover boot entry. (Not a drive of any sort, just the boot entry that was made by the distro)

Could be I’m doing it entirely wrong, but it hasn’t caused any issues for me. :slight_smile:

efibootmgr can remove the EFI OS entry, or just do if from BIOS.

afaik systemd-boot reads efi memory so removing entries in systemd will also remove efi entries but don’t know about grub.
I still have an entry on my ASUS MBD that points a drive label (the actual drive label, not OS or UEFI partition) to a USB stick that booted once!
EFI stores what it thinks, in it’s own time and doesn’t care what you want, and often tries to boot from anything else in the case that your chosen one fails, all in the sake of helping us boot something no matter what!

Depends on MBD - I can’t remove in mine

Edit: just tried efibootmgr - totally sorts it!

i did it as Oziach said he deal with, everything is ok :slightly_smiling_face: except the OS still coming to the grub list (?) :angry:

Did you update grub?

grub-mkconfig -o /boot/grub/grub.cfg

1 Like

Thanks Elloquin i did’t know this command, so i went to debian and after: sudo grub-install /dev/sda and sudo update-grub2 the ghost no longer appeared into the grub list. :grinning:

1 Like