3

Seems like lately when I go to update my Ubuntu 22.04 machines I constantly see that packages are held back for seemingly no reason. Here's the latest:

Earth:sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  gnome-control-center gnome-control-center-data gnome-control-center-faces
  libapache2-mod-php8.1 php8.1 php8.1-cgi php8.1-cli php8.1-common
  php8.1-mysql php8.1-opcache php8.1-readline
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
Earth:

If I apt upgrade and specify the packages the install works without issue. But why all these hold backs?

karel
  • 122,292
  • 133
  • 301
  • 332

2 Answers2

8

They're called phased updates. "APT now implements phased updates. Previously, only update-manager implemented phased updates, and this was only used on desktops -- the implementation in APT means this works on servers, raspberry pis, and containers, too. This means that some updates will be hold back on some machines while they are being phased." https://discourse.ubuntu.com/t/phased-updates-in-apt-in-21-04/20345

3

Strangely this ends up being the answer. What was not immediately apparent was to create /etc/apt/apt.conf.d/20phased-updates with:

// To have all your machines phase the same, set the same string in this field
// If commented out, apt will use /etc/machine-id to seed the random number generator
APT::Machine-ID "aaaabbbbccccddddeeeeffff";

// Always include phased updates (Default = 1) APT::Get::Always-Include-Phased-Updates "1";

// Never include phased updates

APT::Get::Never-Include-Phased-Updates "0";