A quick look at why not to upgrade kept-back packages manually
2023-05-28
I use the fantastic Mint web app manager quite heavily as I personally employ an no snap, Flatpak or
AppImage policy. Therefore I heavily rely on Chromium to run the web versions of Standard Notes,
Tutanota, WhatsApp, Beatbump and so on. Unfortunately, a recent update of some Mesa components broke not
the normal Chromium, but only my precious web apps and therefore I needed to roll back the packages in
order to keep my production system functional and wait for a fix to be implemented. So let's take a look
at what
kept-back
even means, why should not manually upgrade such packages and how to fix your system. if you
(accidentally) did so...
By design, packages available in all major package managers on Linux can depend on other packages such a
graphics API or serial library to work. When a new version of a package releases, this usually isn'a big
deal. It can however quickly become problematic, if the new release also requires updated dependencies.
If the dependencies have changed on one of the packages you have installed so that a new package must be
installed to perform the upgrade, then that will be listed as
kept-back
. Sometimes it can be even worse in case several packages rely on the same dependencies, but requires
different versions that can't be installed simultaneously - this is what we call
Dependency Hell
. If you now force to upgrade a package that has been marked as
kept-back
, you're pretty likely to break something.
Luckily, Linux gives you full control over you system, so you can rather easily roll a package back to the previously working version. Just follow these steps:
-
Find the full name of the troublesome package by looking through your Bash history, which is usually
stored at
~/.bash_history
. -
List all available versions of the package via
apt show -a PACKAGE
and note down the version number of the working release. -
Manually install the specific version via
sudo apt install PACKAGE=VERSION
. -
You might have to also roll back some of its dependencies, so repeat this process until
apt
is happy.
Hopefully this very short spotlight, was just as helpful to you as fixing my system was for me. If so, feel free to let me know about it in the comments...