Skip to content

Debian – The following packages have been kept back

If you have some problems with package updates and apt-get return the message ‘The following packages have been kept back’ means that the packages have been retained and there are newer versions of the listed packages, which for some reason cannot be installed. (unfulfilled or changed or new dependencies)

The solution:

apt-get dist-upgrade -u

Example:

root@main:~# apachectl -v
Server version: Apache/2.4.10 (Debian)
Server built: Jul 18 2017 18:32:16

root@main:~# apt-get update
Ign:1 http://mirror.nl.leaseweb.net/debian stretch InRelease
Get:2 http://security.debian.org/debian-security stretch/updates InRelease [63.0 kB]
Get:3 http://mirror.nl.leaseweb.net/debian stretch-updates InRelease [91.0 kB]
Hit:4 http://mirror.nl.leaseweb.net/debian stretch Release
Get:5 http://repo.percona.com/apt stretch InRelease [15.8 kB]
Fetched 170 kB in 0s (506 kB/s)
Reading package lists... Done

root@main:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
apache2 apache2-bin apache2-data libgd3 linux-image-amd64
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

root@main:~# apt-get dist-upgrade -u
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
firmware-linux-free irqbalance libglib2.0-0 libglib2.0-data liblua5.2-0 libwebp6 linux-image-4.9.0-4-amd64 shared-mime-info xdg-user-dirs
The following packages will be upgraded:
apache2 apache2-bin apache2-data libgd3 linux-image-amd64
5 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.9 MB of archives.
After this operation, 211 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
......

root@main:~# apachectl -v
Server version: Apache/2.4.25 (Debian)
Server built: 2017-09-19T18:58:57

Published inLinux
© 2024 - Marian Amza. All rights reserved.
Powered by Wordpress & Debian