Friday, July 1, 2016

How to install the latest version of a package with apt-get?


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


apt-get install =

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?



just type


apt-get update
apt-get install

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


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...