Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When doing an apt-get upgrade I sometimes get a message saying "The following packages have been kept back". For example:

$ sudo apt-get upgrade                                                                                                
Reading package lists... Done                                                                                                          
Building dependency tree                                                                                                               
Reading state information... Done                                                                                                      
The following packages have been kept back:                                                                                            
  linux-headers-server linux-image-server linux-server                                                                                 
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

What does this mean exactly? Obviously the packages have been held back and not installed, but why?

The follow-on question would be: how does one upgrade these kept back packages?

share|improve this question
A very clear explanation can be found here: debian-administration.org/article/69/… – jplandrain Nov 5 '15 at 9:20
up vote 12 down vote accepted

If the upgrade would require another package to be deleted, or a new package to be installed, the package will be "kept back." As the man page for apt-get upgrade explains:

Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed.

To get past this, you can do

sudo apt-get --with-new-pkgs upgrade

This allows new packages to be installed. It will let you know what packages would be installed and prompt you before actually doing the install.

share|improve this answer
Nice, that's the clearest explanation yet. The man page you linked to on die.net doesn't include the --with-new-pkgs option, though. This one does: manpages.debian.org/cgi-bin/man.cgi?query=apt-get – Charles Roper Nov 6 '15 at 9:34
Thanks, updated the URL in the answer – Chad Nov 6 '15 at 14:16

Basic report is that "apt-get upgrade" will not upgrade packages for-which the package-manager would like to delete and reinstall the package. This happens in security patches a lot because, often, it was actually libraries precursor to the final distributable compilation which were patched. The "go ahead and delete things," functionality lives in "apt-get dist-upgrade" but be sure to run "apt-get update" first just in case the upstream guys figured something out since you last tried. Sometimes they miss things and fix them that fast.

share|improve this answer

I know this thread is ancient but @BT643 is entirely correct. While 'apt-get dist-upgrade' IS used to upgrade your system is does NOT do this by default. The file '/etc/apt/sources.list' must be changed to the new version THEN a dist-upgrade is used.

From the man page:

       dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get
       has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if
       necessary. So, dist-upgrade command may remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve
       desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages.


share|improve this answer

solution - just issue :

sudo apt-get dist-upgrade

which will update the held back package and so clear that notice

share|improve this answer

Just do

sudo apt-get install linux-headers-server linux-image-server linux-server

and you will be fine.

Doing "apt-get dist-upgrade" will upgrade your OS to a new version which is often what people do not want.

p.s. - I know that thread is somewhat old, but this question is asked a lot, so I guess it will help to many.

share|improve this answer
This is incorrect. apt-get dist-upgrade will NOT upgrade your OS to a new version. man apt-get to see the differences. – BT643 Oct 16 '14 at 9:15
@BT643 (and those who upvoted the comment) please downvote wrong answers instead of just leaving a comment. Especially blatantly wrong answers like this one that perpetuate a common misconception. We depend on votes to bring good content to the front but also to push wrong content down. – terdon Nov 5 '14 at 0:58
@terdon I tried but don't have enough rep :) (need 125 to downvote). – BT643 Nov 5 '14 at 10:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.