Apt why are packages kept back




















Done The following packages have been kept back: linux-image-amd64 openjdkjre-headless The following packages will be upgraded Is there any way except for using apt-get upgrade to list these packages? Is anyone familiar with this problem? Improve this question. Burathar Burathar 1 2 2 bronze badges. To move forward, edit you question and make the case mre. They are probably kept-back after an algorithm in apt deemed it wouldn't upgrade them, not because they are in the hold state.

An easy method to know why they were kept back is to try to upgrade them explictly. Once you know the reason, maybe you can devise something about it with ansible. VladimirBotka The issue is that it's not something that can be reproduced easily, because there has to be some dependency or so, that causes apt to not upgrade the packages in certain situations.

B I was afraid that that would be the answer, haha. We'll probably have to do some more manual work to check out each different held back package separately then. And it is a bit unfortunate that the python-apt package that ansible uses, does not behave in the same way as apt itself.

Show 1 more comment. Active Oldest Votes. Watch Now. Delivered Tuesdays Sign up today. Editor's Picks. Linux kernel 5. Windows Do these 11 things immediately. Top 5 things to do about your tech before you die. If you're not using a kanban board, you're not as productive as you could be. Comment and share: How to fix apt's "the following packages have been kept back" issue. It showed me that there are packages that can be upgraded but it could not upgrade those packages because of an error that read:.

As you can see in the image above, the problem is arising because of fwupd which is the firmware update manager daemon in Ubuntu and other Linux. The fix for this error is really simple. All you have to do is to use the apt install command with package or packages in the question:.

If you use apt install on an already installed package, it gets updated. In my case, fwupd package was kept back. As you can see in the below screenshot, it suggests two packages that will be installed and then those packages are installed as well.

The above suggested fix should solve the problem for you. Use case: kernel upgrade kept back, you just want to upgrade the kernel, dont want to upgrade entire distribution. If upgrading the program via sudo apt-get upgrade would cause packages to be added or removed, then the program will be held back.

You can use sudo apt-get dist-upgrade in this case, which will then offer to add or remove the additional programs. This is pretty common and usually not an issue. Occasionally particularly during an Ubuntu alpha a dist-upgrade will offer to remove a lot of other programs, in which case you probably want to cancel it.

If the program depends on packages or versions that are not available, then the program will be held back. You really can't do anything but wait in this circumstance, since the package is basically uninstallable.

This can happen when packages get added to the repository out of order, when a package is renamed, or when a package stops providing a virtual package. It's safer than full-upgrade originally named dist-upgrade because "packages will not be removed unless they are unused". From man aptitude :. Upgrades installed packages to their most recent version. Most likely these packages are held back because their installation would create dependency inconsistencies.

This can either happen because you are using archives under active development, ppas, or because the mirror you uses is not fully updated.

In the last case, just wait, when the dependencies are resolved it will be installed the next time. There is another possibility, packages might be held back if there is put a hold on them, or if they are pinned. This is usually because the package has added a dependency, and upgrade doesn't want to add it for you without permission.

Ubuntu New packages will be installed if required to satisfy dependencies, but existing packages will never be removed. If an upgrade for a package requires the remove of an installed package the upgrade for this package isn't performed. See: apt man page: I have found that aptitude does a better job at upgrading packages if the versions differ just slightly.

I had a situation like this:. This made apt-get hold back the update, but aptitude updated it just fine. I'm unsure which algorithm is used to determine if a package should be updated or not. I guess these two had the same version, only a different 'qualifier'. But in any case, apt-get wouldn't update it, but aptitude would.

I'm adding this answer because I'm not satisfied with how other answers handle the why part of the question to understand what's going on and choose the appropriate course of action.

To my knowledge, there are 2 categories of reasons for packages being kept back during apt upgrade. The best authoritative source of information I could find regarding this is marked as obsolete, but it says:. Possible reasons are broken dependencies a package on which it depends doesn't have a version available for download or new dependencies the package has come to depend on new packages since the last version.

With the current version e. The important parts are the Depends and Recommends package lists. If there are new packages in those lists in the new version of the kept back package, apt won't automatically upgrade it. At this point there are 2 options to upgrade the kept back package. Note that both solutions below have the proper arguments to avoid erroneously changing a package from "automatically installed" to "manually installed". To upgrade the package and install any new "Recommended" packages i.

To upgrade the package without installing any newly added "Recommended" packages , use --with-new-pkgs. Upgrading the docker-ce package on Ubuntu Version I wish apt would be more helpful and simply suggest installing it or something instead of leaving me with an old version Anyhow, here are the 2 possible fixes with --dry-run for illustration purposes :.

In my case packages held back were those related to linux-headers and kernel. I came to this by trying to solve an issue with having a red exclamation mark in the notification area and not being able to update packages. To solve it, I did not have to use neither dist-upgrade nor manual apt-get install xxx.

Then I just worked with the computer for a while and then standard update dialogue has appeared again finally including "Ubuntu base" section with kernel and related.

The update was performed without any trouble and I do not see any held back packages any more. I ran into this problem when a new kernel was released. Possibly because I have unstable updates enabled. I found the simplest way to do the install was through Ubuntu's graphical installer update-manager. At least this worked for me when libjpeg-progs was stuck after upgrading from Ubuntu I'm sure you can do the same with any other kept back app, e. I ran into this problem using synaptic because it appeared to hang, and to try and fix this I re-booted and tried again.

I had to hit " details ", and then ' q ' for quit after reading the message, and then things proceeded normally. I have read all the posts and found that there are many interesting explanations. I was trying all of them but have not any results completely. I have a problem with mysql-utilities which I couldn't upgrade.

The updating was proposed by the system. So, I want to show some steps to do it. Of course, I will repeat in some moments all of the aforementioned posts.

Here is my mistake, yes I found it by already existed posts, but what should I do next? Results - Fine! Later I installed this new version of package correctly.



0コメント

  • 1000 / 1000