“The following packages have been kept back” ?

debian
We might see this during a “apt-get upgrade” command on Ubuntu:

Calculating upgrade... Done
The following packages have been kept back:
  linux-cloud-tools-virtual linux-generic linux-headers-generic 
  linux-image-generic linux-signed-generic linux-signed-image-generic
  mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

According to [this article]:

There we can see packages haven’t been upgraded, even though newer packages are available. This is because two new packages were introduced, and these upgrades depend upon it.

To upgrade it, and you’re ABSOLUTELY SURE that you want to install the new introduced packages:

apt-get dist-upgrade

The following message will appear and you’re good to go:

The following NEW packages will be installed:
  libevent-core-2.0-5 linux-cloud-tools-4.4.0-38 linux-cloud-tools-4.4.0-38-generic linux-headers-4.4.0-38 linux-headers-4.4.0-38-generic
  linux-image-4.4.0-38-generic linux-image-extra-4.4.0-38-generic linux-signed-image-4.4.0-38-generic
The following packages will be upgraded:
  linux-cloud-tools-virtual linux-generic linux-headers-generic linux-image-generic linux-signed-generic linux-signed-image-generic
  mysql-server-5.7 mysql-server-core-5.7
8 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.

Note that this command may also remove your existing packages while upgrading – which means there are possibilities your system could be messed up.

One thought on ““The following packages have been kept back” ?

Leave a Reply