A few times, when running sudo apt-get upgrade
, I've run into the message "The following packages have been kept back:", followed by a list of packages that would not be upgraded. Searching the message online shows that most people solve this by using sudo apt-get dist-upgrade
. However, it is sometimes stated that this is a dangerous command, that "it could leave you with a very broken system". Therefore I've always solved this by performing sudo apt-get --with-new-pkgs upgrade
instead. Always... until now. Now I've run into a situation where the first command worked, while the second refused to (i.e., it led to the same "packages have been kept back" problem).
What could be the cause of this? I know that dist-upgrade
is allowed to remove packages, instead of only being able to install new ones (as the --with-new-pkgs
flag does). But why would an upgrade need to remove any of my packages?