Files not deleting: sudo rm -rf /etc/grub.d/* does nothing

Hi, i am having some problems trying to delete all the files in a directory.
I can manually delete one file at a time.
If i do it without the “rf” option it says “no such file or directory”.
In other directories it works as i would expect.


I was following this Working with the GRUB 2 Boot Loader :: Fedora Docs
so in theory it should work if it’s in the docs?

Thank you

Are you running from a live USB image?
Then file system on the USB image is read-only.
Did you mean to mount the disk from a broken install to try and fix it?

No, i am running on fedora installed on the ssd, i changed some things in grub and now want to go back to default because it’s half broken (and i didn’t make any config backup…).

The shell have doesn’t have permission to expand the wildcard. You can do this instead

sudo sh  -c 'rm -rf /etc/grub.d/*'

or

sudo rm -rf /etc/grub.d
mkdir /etc/grub.d

Yes that works, thank you very much