/boot almost full, how can I remove the rescue initramsfs?

Hi,
I am facing a nearly full (80%) /boot partition and noted that I have two rescue initramfs (176.2 MB each) installed. I don’t need any initramfs-rescue images.

How can I remove them and ensure that they are not getting reinstalled? Any idea why I would have two of them?

You should have one for each vmlinuz-%-rescue kernel you have. The checksum/timestamp/whatever it is at the end of the rescue kernel entry should match. i

Permissions Size User Date Modified Name
.rw-------@ 177M root 15 May 20:58  initramfs-0-rescue-60e6926ef6e148f2a81930f078796b11.img
.rwxr-xr-x@  17M root 15 May 20:57  vmlinuz-0-rescue-60e6926ef6e148f2a81930f078796b11

Delete the one which doesn’t match, unless you have two rescue kernels… not sure how you’d get into that position but we live in interesting times.

You can remove the dracut-config-rescue package, and the rescue won’t be re-created.

1 Like
-rw-------. 1 root root 168M 2025-08-31 17:47 initramfs-0-rescue-9e810716f5e840d9ad5bffdbde2d7346.img
-rw-------. 1 root root 168M 2025-09-02 15:49 initramfs-0-rescue-f93ff8565f0345859c29ad9ffc2d0b9e.img
-rw-------. 1 root root  63M 2025-09-04 09:17 initramfs-6.16.4-200.fc42.x86_64.img
-rw-------. 1 root root  63M 2025-09-05 11:27 initramfs-6.16.5-200.fc42.x86_64.img
-rw-------. 1 root root  83M 2025-09-17 20:46 initramfs-6.16.7-200.fc42.x86_64.img
-rwxr-xr-x. 1 root root  17M 2025-08-31 17:46 vmlinuz-0-rescue-9e810716f5e840d9ad5bffdbde2d7346*
-rwxr-xr-x. 1 root root  17M 2025-09-02 15:48 vmlinuz-0-rescue-f93ff8565f0345859c29ad9ffc2d0b9e*
-rwxr-xr-x. 1 root root  17M 2025-08-28 02:00 vmlinuz-6.16.4-200.fc42.x86_64*
-rwxr-xr-x. 1 root root  17M 2025-09-04 02:00 vmlinuz-6.16.5-200.fc42.x86_64*
-rwxr-xr-x. 1 root root  17M 2025-09-11 02:00 vmlinuz-6.16.7-200.fc42.x86_64*

This is what I got. Apparently, two pair of matching initramfs-rescue and vmlinuz-rescue. not seen this before…

Maybe at some point, your machine-id changed, like mine, so you have an older pair of files with the old machine-id in their name.

Have you made a hardware change during the life of this installation?

1 Like

I’d try booting both of them, ensure at least one works and then delete the oldest in the event of a tie.

Rebuild grub and away you go.

Oh, very good hint. The machine is brand-new, but I installed a GPU after installing the system, so that could have triggered the change of machine-id.

GRUB discovers these dynamically (at boot-time, not at config-build-time) from the files in the /boot/loader/entries directory. So the GRUB config shouldn’t need to be regenerated when manually deleting a rescue kernel, but the corresponding entry in /boot/loader/entries will need to be deleted to avoid a phantom unbootable item in the GRUB menu.

1 Like

Excellent.
I’m an old LILO user so faffing with boot options almost always required a rebuild of LILO. Muscle memory for me these days.