Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Thanks. Plenty of new stuff for me to digest. Backport examples proceed as if the admin has advanced knowledge of whether to install from the backports packages right from the start. Must we first 'apt remove/purge ...' the installed older package (and dependent pkgs) before explicitly pointing at and installing a newer backports version or will the addition to the sources.list allow upgrading an already installed, older, non-backport package to a newer backports one (i.e. sudo apt-get upgrade git/bullseye-backports) generally without any problems? Commented Sep 21, 2022 at 9:29
  • You can upgrade from backports without installing the previous package with sudo apt install -t bullseye-backports git. Commented Sep 21, 2022 at 9:34
  • Just to be clear, since that would seems to be installing a new git package explicitly from backports. My hypothetical scenario is: sudo apt install git ... Oh dear, that's an old version but there's a newer backport version, so will then doing sudo apt install -t bullseye-backports git automatically upgrade the previously installed git? If so, is that going to do anything different from sudo apt upgrade git/bullseye-backports which indicates it recognises and will perform an upgrade to git? Commented Sep 21, 2022 at 10:55
  • There can only ever be one version of a given package installed, so installing git from backports replaces whatever version is currently installed, if any. apt install is used both for installing and upgrading named packages; apt upgrade upgrades everything, it ignores any additional non-option arguments (so apt upgrade git/bullseye-backports won’t actually install git from backports, it will upgrade any upgradable packages). Commented Sep 21, 2022 at 11:07
  • Aha. I wasn't aware that 'apt install ...' is really more of a 'install or upgrade'-style process. Thanks for all the help. Commented Sep 21, 2022 at 12:14