12/14/2023 0 Comments Ubuntu sudo apt upgradeLots more info here: What are phased updates, and why does Ubuntu use them? Case study: upgrading the docker-ce package Sudo apt -o APT::Get::Always-Include-Phased-Updates=true upgrade -dry-run This process allows us to automatically monitor for regressions and halt the update process if any are found. Once an update is released to -updates, the update is then phased so that the update is gradually made available to expanding subsets of Ubuntu users. To upgrade the package without installing any newly added "Recommended" packages, use -only-upgrade. (Tip: add -dry-run to see what will happen before doing it) as if newly installed with apt install, use -with-new-pkgs: sudo apt upgrade -with-new-pkgs To upgrade the package and install any new "Recommended" packages (i.e. Note that both solutions below have the proper arguments to avoid erroneously changing a package from "automatically installed" to "manually installed". If there are new packages in those lists in the new version of the kept back package, apt won't automatically upgrade it.Īt this point there are 2 options to upgrade the kept back package. The important parts are the Depends and Recommends package lists. (or just use apt show -a to view all versions directly, but it makes the version comparison harder in my opinion) 2:-1ubuntu1.4), we can figure out the changed dependencies with apt show: apt show =Īpt show vim=2:-1ubuntu1.3 vim=2:-1ubuntu1.4 Vim/bionic-updates,bionic-security 2:-1ubuntu1.4 amd64 This will tell you the current and candidate upgrade versions of the package: $ apt list 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) means that there are new versions of these packages which will not be installed for some reason. The best authoritative source of information I could find regarding this is marked as obsolete, but it says: To remove a hold on a package and allow it to be upgraded: sudo apt-mark unhold To list all packages marked on hold or find out if a package is on hold use: apt-mark showhold Hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed. 1) It is marked as held backĪpt-mark can do this: sudo apt-mark hold To my knowledge, there are 3 categories of reasons for packages being kept back during apt upgrade. Hopefully this will help someone avoid blindly running apt dist-upgrade in despair! Why is a package kept back? 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. If you're feeling lucky, you can drop your car off with your cousin dist-upgrade and hope she knows her stuff. if you have time and are handy with a wrench, you'll get some peace of mind by reading up and doing the repair yourself. but you're probably better off learning a bit more about APT and resolving the dependency issues "by hand" by installing and removing packages on a case-by-case basis. So if you find yourself in a place where the "cautious solution" doesn't work, dist-upgrade may work. Unlike you, APT isn't always smart enough to know whether these additions and removals could wreak havoc. Unlike upgrade it may remove packages to resolve complex dependency situations. In most cases this will give the kept-back packages what they need to successfully upgrade.Ī more aggressive solution is to run sudo apt-get dist-upgrade, which will force the installation of those new dependencies.īut dist-upgrade can be quite dangerous. The cautious solution is to run sudo apt-get install. If Pablo's solution works for you, please upvote it. This has the benefit of not marking the kept-back packages as "manually installed," which could force more user intervention down the line (see comments). Per Pablo's answer, you can run sudo apt-get -with-new-pkgs upgrade, and it will install the kept-back packages. Another reason is that phased updates may be enabled, and the updates have not yet been released for your machine.) (Note that this is not the only reason that you may be seeing the message "packages have been kept back". If the dependencies have changed on one of the packages you have installed so that a new package must be installed to perform the upgrade then that will be listed as "kept-back".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |