Old kernels accumulate

Hello.

Every time Fedora is updated, old kernels accumulate.
Is there a good way to automatically remove old kernels that are no longer needed?

There should be a limit, that is 3 versions by default.

Maybe this topic could be useful: Pin or retain a kernel version (or increase the number of kernels retained)

5 Likes

If you have more than 3 kernels installed for some reason, please tell us, we’ll troubleshoot it.

3 kernels is a good number to have, because sometimes after you boot new kernel you can have something not working or not working quite right) In such a case you can just reboot into older kernel that worked or. Some people ever recommend to increase the number of kernel Fedora has installed to five. I’m ok with three.

4 Likes

Thank you. Hope I can keep updating the kernel now until the day developers fixed the bug concerning amd graphics and I hope I can keep these two latest working kernel versions until the problem is really solved.


x ~]$ sudo dnf versionlock add kernel-5.0.9-301.fc30.x86_64
Last metadata expiration check: 0:22:23 ago on Wed 04 Sep 2019 05:23:59 AM CEST.
Adding versionlock on: kernel-0:5.0.9-301.fc30.*
x ~]$ sudo dnf versionlock add kernel-5.1.20-300.fc30.x86_64
Last metadata expiration check: 0:23:27 ago on Wed 04 Sep 2019 05:23:59 AM CEST.
Adding versionlock on: kernel-0:5.1.20-300.fc30.*

It didn’work. Last kernel update removed a locked kernel.

1 Like

I set my boot partition too small and didn’t realize there was a limit. Resetting the partition to a larger size solved the problem.

Thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.