Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 926  / 3 Years ago, mon, november 29, 2021, 10:30:56

I am wondering what the behavior of apt is when publishing multiple major versions of the same package. For example, if I have a package called foo, with a latest version of 1.0.0, and I publish version 2.0.0, then publish version 1.1.0 afterwards, which will be regarded as the latest package when running sudo apt updateand sudo apt install foo: the last package published (in this case 1.1.0) or the package with the highest version number (in this case 2.0.0)?


More From » apt

 Answers
7

By default, apt downloads the package with highest version number (even if that was not the last published version).


However, if both packages are available in separate repositories, you can install the earlier version with sudo apt install foo=1.1.0.


Afterward, you can prevent that specific package from upgrading to version 2.0.0, sudo apt-mark hold foo.


(To revert this behavior, you will have to unhold the package).


[#764] Tuesday, November 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ilityushing

Total Points: 18
Total Questions: 100
Total Answers: 113

Location: Senegal
Member since Wed, May 13, 2020
4 Years ago
ilityushing questions
Sat, Apr 1, 23, 03:07, 1 Year ago
Wed, Mar 2, 22, 12:25, 2 Years ago
Tue, Jun 15, 21, 14:34, 3 Years ago
Sun, Aug 15, 21, 18:44, 3 Years ago
Wed, Apr 6, 22, 00:57, 2 Years ago
;