So yes dist-upgrade may remove some packages as well, but it's not only dist-upgrade that would do this; under certain circumstances, upgrade would, as well. Show 25 more comments. Pablo Bianchi 9, 3 3 gold badges 48 48 silver badges 89 89 bronze badges. Very weird. Any thoughts? Does apt-get install also remove packages when necessary to resolve gnarly dependency situations, or would you have to run a separate apt-get remove command to accomplish that part of the upgrade process?
The packages that were "automatically installed and [ If the upgrade would require a new package to be installed, the package will be "kept back.
Show 7 more comments. Try this Unix SE answer : sudo apt-get --with-new-pkgs upgrade This allows new packages to be installed. Pablo Bianchi Pablo Bianchi 9, 3 3 gold badges 48 48 silver badges 89 89 bronze badges.
Note to who ever reads my comment above: not having the side effect of marking as manually installed is a good thing. I like this answer. For some reason sudo apt-get --with-new-pkgs upgrade still shows the packages as "kept back".
No error message. Just want to add that for many up to date debian 9. Thank you for this, Pablo, as I had luckily tested other options on staging environments beforehand, and could admin many servers up to security standards thanks to the --with-new-pkgs inclusion with much cleaner results for general future package management. Show 4 more comments. Better way to handle kept back package: sudo aptitude If you have kept back package you should see Upgradable Packages on top of the list.
Michael Crenshaw It's good to be aware that dist-upgrade upgrades all packages, but with the default repositories, that should be fine. Not using dist-upgrade could be dangerous, as you might miss security updates.
Any package installation command can cause serious damage if you have problems in your sources. A regular apt-get upgrade command will install any package from any software source that is enabled; dist-upgrade is not unique in this way.
Furthermore, using aptitude to perform any operation at all, at least on amd64, is much more dangerous than running apt-get dist-upgrade , in a release where bug isn't fixed. For me, it was easier local machine with X running to just open synaptic and force the package's upgrade.
For some reason it didn't seem to show up at all where you described in synaptic. Also sudo aptitude safe-upgrade — msanford. Your solution fixed it for me where sudo apt-get --with-new-pkgs upgrade did not.
There are normally two reasons you may see this message. Is there a way to determine whether the held package needs a dependency that can't be installed or if it is being held because other packages depend on it.
I have many held packages and I believe both of these cases may apply on my system. Thanks, the second reason was the issue for me. Even apt-get dist-upgrade refused to install it. Inspecting the package with aptitude showed that it depends on a package that isn't available. I guess I'll have to wait. You can also try: sudo aptitude safe-upgrade It's safer than full-upgrade originally named dist-upgrade because "packages will not be removed unless they are unused".
From man aptitude : safe-upgrade Upgrades installed packages to their most recent version. Afilu Afilu 4 4 silver badges 3 3 bronze badges. Edit: There is another possibility, packages might be held back if there is put a hold on them, or if they are pinned. What do you base that likelihood on, without knowing whatever he ran an apt-get upgrade or an apt-get dist-upgrade alt. This is often caused by development archives where the and available packages dependencies are changing very quickly.
Wait for them to settle down and you may not need to dist-upgrade at all. If you'd still like to dist-upgrade , then look at the NEW packages to be installed and the packages to be removed before going ahead.
This is my case because I get the "kept back" message using dist-upgrade — Postadelmaga. This worked for me sudo aptitude full-upgrade. Eric Carvalho Singh Singh 1 1 silver badge 2 2 bronze badges. Even aptitude upgrade worked for me. I had a package which was breaking the upgrade of another package.
I didn't need the one I installed, so aptitude full-upgrade gave me the option to remove it so it could upgrade everything else. If you run: sudo apt-get install gimp gimp-data libgegl John Lawrence Aspden John Lawrence Aspden 1, 2 2 gold badges 18 18 silver badges 25 25 bronze badges.
Upgrades specific packages and their dependencies without the commitment risks of a dist-upgrade. The package manager doesn't want to manage packages "without my permission" even though I manually typed sudo apt upgrade. Note: full-upgrade remains on the current distribution.
After this operation, 2, MB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say! This answer is wrong! See here askubuntu. Alexander Torstling Alexander Torstling 3 3 silver badges 4 4 bronze badges. What does this mean exactly?
Obviously the packages have been held back and not installed, but why? If the upgrade would require another package to be deleted, or a new package to be installed, the package will be "kept back. 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.
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. 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 quickly. So, dist-upgrade command may remove some packages. While this command is used to upgrade to a new major version of the operating system, it does not do this by default.
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. What does "The following packages have been kept back" mean? Ask Question. Asked 9 years, 6 months ago.
Active 1 year, 9 months ago. Active Oldest Votes. The following packages will be upgraded: tmux 1 upgraded, 0 newly installed, 0 to remove and 68 not upgraded.
Improve this answer. Vladimir Botka Vladimir Botka 2, 6 6 silver badges 15 15 bronze badges. The problem isn't about manually held back packages, it is about packages that are automatically held back by apt itself. That is why I don't think its a problem with ansible specifically, but in either the python module used by ansible, or apt itself. Add a comment.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Explaining the semiconductor shortage, and how it might end. Does ES6 make JavaScript frameworks obsolete?
Done Building dependency tree Reading state information Done Calculating upgrade Done The following packages have been kept back: libpve-storage-perl pve-container pve-manager 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. Reading package lists Done 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. May 2, 5, Yeeeeees - pointed me to the right direction.
There is a bug in a needed package - in libyaml-libyaml-perl. So after installing it despite the open bug report, the upgrade worked. Thank you! Karsten Bash:. Done Some packages could not be installed.
This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Done The following NEW packages will be installed: libyaml-libyaml-perl 0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
0コメント