
On that day I received an email from a person asking me how to recover EFI files, yes those that are stored in the path: /boot/efi.
According to the person, the system had created the directory in the path: /boot/grub/x86_64-efi and the grub of a second system was trying to find it in /boot/efi, so she decided to create a symbolic link to try solve the problem:
ln -s /boot/grub/x86_64-efi /boot/efiOnly that did not solve it and she decided to remove the symbolic link with the following command:
rm -rf /boot/efi
What happens is that the /boot/grub/x86_64-efi directory has not been removed, but the files have! 😱

If you create a test there on your system with directories in your /home/$USER/ just for that, you will realize that this is really what will happen!
Well, the measure to be taken so that this does not happen is to use the command unlink before removing. Take her example as an example.
First, it should “remove the link” the directory, like this:
unlink /boot/efiAnd only after that use the rm command:
rm -rf /boot/efiSometimes (just, sometimes, don’t get used to it), simple solutions avoid complex problems!