How To: The following packages have been kept back

Recently while trying to "upgrade" my now getting out of date Hardy Heron 8.04 LTS revision of Ubuntu I noticed that a few of the packages were being kept back.

Normally to upgrade Ubuntu:

...@her###:~$ sudo aptitude update
...@her###:~$ sudo aptitude safe-upgrade


The aptitude update command updates the list of available packages from the apt sources, while safe-upgrade upgrades installed packages to their most recent version. Installed packages will not be removed unless they are unused and packages which are not currently installed will not be installed.

This comes from the Ubuntu manual on aptitude "It is sometimes necessary to remove or install one package in order to upgrade another; this command is not able to upgrade packages in such situations. Use the full-upgrade command to upgrade as many packages as possible."

What this means (read carefully as it may be a little bit difficult to follow) is that if the dependencies of some of the packages have changed on one of the packages you have installed so that a new package must be installed to perform the upgrade then that package will be kept back. The easiest way to show this is by example;

...@her###:~$ sudo aptitude safe-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages have been kept back:
bind9-host dnsutils f-spot language-support-writing-en libbind9-30
libisccc30 libisccfg30 linux-generic linux-headers-generic
linux-image-generic linux-restricted-modules-generic ssl-cert
0 packages upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.


Please note, there are 12 newer packages available in the repositories which are been kept back. This is because some of the above packages are new, recently changed or just introduced and these upgrades depend upon it. Therefore in order to solve this issue the recommended solution is to use the full-upgrade command to upgrade as many packages as possible.

...@her###:~$ sudo aptitude full-upgrade

No comments:

Post a Comment