I just upgraded from Ubuntu 20.04 to 22.04, and I noticed that there were quite a few packages left in a "have been kept back" state when I do apt upgrade and even apt dist-upgrade won't pick them.
tuska@media:~$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
gir1.2-gtk-4.0 libcryptsetup12 libgtk-4-1 libgtk-4-bin libgtk-4-common python3-software-properties software-properties-common software-properties-gtk
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Forcing each one with apt install seems to work and in the case I tried (was tomcat9) there was nothing to explain why this package was not picked by apt upgrade (no extra package to install or package to remove), but I would really prefer to keep them being seeing as dependencies by apt.
I previously had this kind of problem with holded packages, but I checked that, and I don't have any holded package.
tuska@media:~$ sudo apt-mark showhold
tuska@media:~$
So I'm now out of ideas...
Does anyone have any idea what to look at to understand what might cause these packages to be kept back, and why dist-upgrade does not care ?