GRUB2 Entries not updated in Fedora 42

Hi there,
After upgrading from Fedora 41 to 42, using dnfdragora to remove the older kernel and modules, the grub2 entries still have Fedora 41, and it seems that the relevant files are still there (loaders and such).

I’m afraid to remove those manually! Plus, I’m not sure this will remove the 41 entry in the grub2 menu.

Please advise! And thanks a million in advance.

Hosam Adeeb Nashed

That is normal. When you upgrade to Fedora 42 you would get at most one kernel package from the new version, and the two newest from Fedora 41 will just stay installed. That really doesn’t make much of a difference as the 41 and the 42 kernels are basically the same versions. In some cases the version 41 kernel will be newer than the version 42 kernel in which case you don’t get a new kernel.

Leave the last 2 F41 kernels in place is a good safyly measye incase you have trouble booting with the f42 kernel. You can vott on the last good f41 kernel.

As you update f42 you will see ne kernels get installed and the oldest kernel will be remove.

After a few weeks you will have 3 f42 kernals and no f41 kernels.

As I mentioned in my original post, I had already un-installed the one kernel that remained from Fedora 41.

Previously, dnfdragora would remove the kernel and its modules, but would also take care of removing its entry in GRUB. But that didn’t happen in the updated version of dnfdragora.

Actually, that newer version, when I search for “kernel” wouldn’t show me every package containing the term I’m searching for, like it used to do!

Now my question is: how do I handle the redundant entries in the GRUB menu? And the stale files pertaining to the un-installed kernel?

Again, thank you for your help.

Hosam Adeeb Nashed

Fedora use Boot Loader Spec(BLS).
This means that each kernel is configured in grub in it’s own folder.

Look at /boot/loader to find the .conf files.
You will see /boot files with the kernel version in their name for the removed kernels.
And there are kernel modules in /lib/modules.

I think that all the places kernel files are installed that you need to check for a cleanup.

1 Like

The entries are automatically removed when a kernel has been correctly uninstalled . It’s not enough to just remove the package kernel-<version><arch><fedora-version>.

You must uninstall the corresponding kernel-core rpm and, if installed, the kernel-devel rpm. This will take care of all the other packages for this specific kernel version.

rpm -qa kernel\* will show all installed kernel rpms.

1 Like