0

When Fedora boots, I am offered several older versions of the current main version. Sometimes, after a sudo dnf update, I get a version that breaks something important. At that point I usually try rebooting to an older version (selected at start-up) and if that reboot restores functionality, I am (temporarily) happy.

So let's say I perform another dnf update the next day and get another version that still breaks my machine. So again I reboot to that previous version that works (happy again).

However, one cannot do this forever as eventually the working (older) version falls off the list and I end up only being able to choose versions that have the problem.

Is there a way to either "lock" an older version onto the list, or extend the length of the list so that the working version stays available? Or some other "fix"?

1 Answer 1

1

To keep older kernel version (that's what you can choose at start-up) you can:

  1. Lock specific kernel version

First list all installed kernels with

rpm -qa kernel\*

command and choose version you want to keep. Then lock that kernel using dnf mark install command like this:

dnf mark install kernel-4.18.9-200.fc28.x86_64
  1. Set the number of older kernels to keep

To make it you can use dnf configuration option installonly_limit, which is set in the [main] section of /etc/dnf/dnf.conf file. Default value is 3. You can choose to keep more installonly packages (which include kernels) by using a greater number, e.g.

installonly_limit=5

or keep all installed kernel by setting installonly_limit to zero. Note that if you choose to keep all old kernels they can take quite a lot of disk space.

You can read more here:

DNF mark command

DNF installonly_limit

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .