Ubuntu 22.04 has an annoying apt bug. It does not properly upgrade all packages
Running apt in dist-upgrade mode generates weird results as some packages are not upgraded. The only solution is to manually add each not upgraded package to command line which is super annoying and wastes precious time :\ The following behavior is what reproduces faulty results:
juozas@xubuntu:~$ export LC_ALL=C
juozas@xubuntu:~$ sudo apt-get --no-install-recommends dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
linux-headers-5.15.0-46 linux-headers-5.15.0-46-generic linux-image-5.15.0-46-generic linux-modules-5.15.0-46-generic linux-modules-extra-5.15.0-46-generic
linux-tools-5.15.0-46 linux-tools-5.15.0-46-generic
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
fonts-opensymbol libreoffice libreoffice-base libreoffice-base-core libreoffice-base-drivers libreoffice-calc libreoffice-common libreoffice-core
libreoffice-draw libreoffice-gtk libreoffice-gtk2 libreoffice-gtk3 libreoffice-help-common libreoffice-help-en-gb libreoffice-help-en-us libreoffice-impress
libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-lt libreoffice-math libreoffice-report-builder-bin libreoffice-style-colibre libreoffice-writer
libuno-cppu3 libuno-cppuhelpergcc3-3 libuno-purpenvhelpergcc3-3 libuno-sal3 libuno-salhelpergcc3-3 python3-uno uno-libs-private ure
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
juozas@xubuntu:~$ sudo apt-get --no-install-recommends dist-upgrade fonts-opensymbol
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
linux-headers-5.15.0-46 linux-headers-5.15.0-46-generic linux-image-5.15.0-46-generic linux-modules-5.15.0-46-generic linux-modules-extra-5.15.0-46-generic
linux-tools-5.15.0-46 linux-tools-5.15.0-46-generic
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
libreoffice libreoffice-base libreoffice-base-core libreoffice-base-drivers libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
libreoffice-gtk libreoffice-gtk2 libreoffice-gtk3 libreoffice-help-common libreoffice-help-en-gb libreoffice-help-en-us libreoffice-impress
libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-lt libreoffice-math libreoffice-report-builder-bin libreoffice-style-colibre libreoffice-writer
libuno-cppu3 libuno-cppuhelpergcc3-3 libuno-purpenvhelpergcc3-3 libuno-sal3 libuno-salhelpergcc3-3 python3-uno uno-libs-private ure
The following packages will be upgraded:
fonts-opensymbol
1 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
Need to get 102 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 fonts-opensymbol all 2:102.12+LibO7.3.6-0ubuntu0.22.04.1 [102 kB]
Fetched 102 kB in 0s (340 kB/s)
(Reading database ... 332342 files and directories currently installed.)
Preparing to unpack .../fonts-opensymbol_2%3a102.12+LibO7.3.6-0ubuntu0.22.04.1_all.deb ...
Unpacking fonts-opensymbol (2:102.12+LibO7.3.6-0ubuntu0.22.04.1) over (2:102.12+LibO7.3.5-0ubuntu0.22.04.1) ...
Setting up fonts-opensymbol (2:102.12+LibO7.3.6-0ubuntu0.22.04.1) ...
Processing triggers for fontconfig (2.13.1-4.2ubuntu5) ...
juozas@xubuntu:~$ sudo apt-get --no-install-recommends dist-upgrade libreoffice
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Error!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libreoffice-base : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed
libreoffice-base-core : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed or
libreoffice-core-nogui (= 1:7.3.5-0ubuntu0.22.04.1) but it is not installable
libreoffice-calc : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed
libreoffice-core : Breaks: libreoffice-base (< 1:7.3.6-0ubuntu0.22.04.1) but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
Breaks: libreoffice-calc (< 1:7.3.6-0ubuntu0.22.04.1) but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
Breaks: libreoffice-draw (< 1:7.3.6-0ubuntu0.22.04.1) but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
Breaks: libreoffice-gtk2 (< 1:7.3.6-0ubuntu0.22.04.1) but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
Breaks: libreoffice-gtk3 (< 1:7.3.6-0ubuntu0.22.04.1) but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
Breaks: libreoffice-impress (< 1:7.3.6-0ubuntu0.22.04.1) but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
Breaks: libreoffice-writer (< 1:7.3.6-0ubuntu0.22.04.1) but 1:7.3.5-0ubuntu0.22.04.1 is to be installed
libreoffice-draw : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed
libreoffice-gtk3 : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed
libreoffice-impress : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed
libreoffice-math : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed
libreoffice-writer : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed
python3-uno : Depends: libreoffice-core (= 1:7.3.5-0ubuntu0.22.04.1) but 1:7.3.6-0ubuntu0.22.04.1 is to be installed or
libreoffice-core-nogui (= 1:7.3.5-0ubuntu0.22.04.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
juozas@xubuntu:~$