Ubuntu – Resolving ‘The Following Packages Have Been Kept Back’ Issue

apt-getaptitudedebianUbuntu

Very much what the title says. The new twist is that I am aware of this and of this and of this discussions, and relative replies. But…

  me@me:~$ sudo apt-get update
        Hit:1 http://fr.archive.ubuntu.com/ubuntu jammy InRelease                                                    
        Hit:2 http://fr.archive.ubuntu.com/ubuntu jammy-updates InRelease                                           
        Hit:3 http://fr.archive.ubuntu.com/ubuntu jammy-backports InRelease        
        Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
        Reading package lists... Done
  me@me:~$ sudo apt-get dist-upgrade
        Reading package lists... Done
        Building dependency tree... Done 
        Reading state information... Done
        Calculating upgrade... Done
        The following packages have been kept back:
           tzdata xdg-utils
        0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

In other words, I do not have conflicting package repos, as suggested in ref. 3, and I have used apt-get dist-upgrade, as suggested in the first two references. Of course
I can update manually,

  me@me:~$ sudo apt-get install -y tzdata xdg-utils
        Reading package lists... Done
        Building dependency tree... Done
        Reading state information... Done
        The following packages will be upgraded:
           tzdata xdg-utils
        2 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
        Need to get 397 kB of archives.
        After this operation, 48,1 kB disk space will be freed.
        Get:1 http://fr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 tzdata all 2022c-0ubuntu0.22.04.0 [335 kB]
        Get:2 http://fr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 xdg-utils all 1.1.3-4.1ubuntu3~22.04.1 [61,9 kB]
        Fetched 397 kB in 0s (1.462 kB/s)    
        Preconfiguring packages ...
        (Reading database ... 346424 files and directories currently installed.                
        Preparing to unpack .../tzdata_2022c-0ubuntu0.22.04.0_all.deb ...
        Unpacking tzdata (2022c-0ubuntu0.22.04.0) over (2022a-0ubuntu1) ..              
        Preparing to unpack .../xdg-utils_1.1.3-4.1ubuntu3~22.04.1_all.deb ...
        Unpacking xdg-utils (1.1.3-4.1ubuntu3~22.04.1) over (1.1.3-4.1ubuntu1.22.04.1) ...
        Setting up tzdata (2022c-0ubuntu0.22.04.0) ...

        Current default time zone: 'Europe/Paris'
        Universal Time is now:  Fri Sep  2 07:52:12 UTC 2022.
        Run 'dpkg-reconfigure tzdata' if you wish to change it.

        Setting up xdg-utils (1.1.3-4.1ubuntu3~22.04.1) ...
        Processing triggers for man-db (2.10.2-1) ...

Thus this is a nuisance more than a problem, but: first, it happens rather often, despite my attempts at clearing caches, and so on (apt-get clean && apt-get autoclean), and second I would like to know what causes the problem, because the fact that the update does not take place even after an apt-get dist-upgrade clearly makes me suspect there might be more than meets the eye. Cheers, and thanks.

Best Answer

If these are Phased Updates, then by forcing the installation you became a beta-tester.

Such packages have limited distribution, intended for some users to get first in order to report a broken package. It's possible, but not advised, to force the installation of these packages.

To test if a held back package is phased, run apt-cache policy <packagename> and look for the 'phased' percentage, that looks like "(phased xx%)".

Related Question