Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  18] [ 0]  / answers: 1 / hits: 67708  / 2 Years ago, thu, july 28, 2022, 8:21:20

It's easy to install a specific version of a package with apt-get:



apt-get install <package name>=<version>


For example:



apt-get install jenkins=1.517


But is there a shortcut for installing the latest version?



For example, say writing a script to automate Jenkins installation. After adding http:/q/pkg.jenkins-ci.org/debian to /etc/apt/sources.list, Jenkins is available from two sources. Now, I'd like to tell apt-get to install the latest version without knowing exactly what the latest version is at the time the script is executed.



Is this possible in any simple way?


More From » apt

 Answers
0

just type



apt-get update    
apt-get install <package-name>


And the latest available in all your repositories will be installed.


[#30896] Thursday, July 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ndeecru

Total Points: 109
Total Questions: 128
Total Answers: 117

Location: Czech Republic
Member since Thu, Aug 11, 2022
2 Years ago
;