Find version package linux

How can I check the version before installing a package using ‘apt-get’?

I’m thinking to install hylafax+ version 5.5.4 which was released last month on my Debian PC. I checked dpkg -l | grep «hylafax» and found out that the current version is 5.5.3. Then I checked apt-cache search hylafax and saw the packages are available, but I can’t see any version number. How can I find the version of packages available in the apt-get ?

11 Answers 11

apt-cache policy will show the version details.

It also shows which version is currently installed and which versions are available to install.

For example, apt-cache policy hylafax+

Can’t believe this isn’t shown in apt install , to give you a chance to review the versions before saying Y .

If we use apt install some packages (may not installed) get install straightaway. So I think for new Linux user its better to use apt policy .

$ apt-cache policy redis-server redis-server: Installed: (none) Candidate: 2:2.8.4-2 Version table: 2:2.8.4-2 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages 
$ apt-get install -s redis-server NOTE: This is only a simulation! apt-get needs root privileges for real execution. Keep also in mind that locking is deactivated, so don't depend on the relevance to the real current situation! Reading package lists. Done Building dependency tree Reading state information. Done The following extra packages will be installed: libjemalloc1 redis-tools The following NEW packages will be installed: libjemalloc1 redis-server redis-tools 0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded. Inst libjemalloc1 (3.5.1-2 Ubuntu:14.04/trusty [amd64]) Inst redis-tools (2:2.8.4-2 Ubuntu:14.04/trusty [amd64]) Inst redis-server (2:2.8.4-2 Ubuntu:14.04/trusty [amd64]) Conf libjemalloc1 (3.5.1-2 Ubuntu:14.04/trusty [amd64]) Conf redis-tools (2:2.8.4-2 Ubuntu:14.04/trusty [amd64]) Conf redis-server (2:2.8.4-2 Ubuntu:14.04/trusty [amd64]) 
$ apt-cache show redis-server Package: redis-server Priority: optional Section: universe/misc Installed-Size: 744 Maintainer: Ubuntu Developers Original-Maintainer: Chris Lamb Architecture: amd64 Source: redis Version: 2:2.8.4-2 Depends: libc6 (>= 2.14), libjemalloc1 (>= 2.1.1), redis-tools (= 2:2.8.4-2), adduser Filename: pool/universe/r/redis/redis-server_2.8.4-2_amd64.deb Size: 267446 MD5sum: 066f3ce93331b876b691df69d11b7e36 SHA1: f7ffbf228cc10aa6ff23ecc16f8c744928d7782e SHA256: 2d273574f134dc0d8d10d41b5eab54114dfcf8b716bad4e6d04ad8452fe1627d Description-en: Persistent key-value database with network interface Redis is a key-value database in a similar vein to memcache but the dataset is non-volatile. Redis additionally provides native support for atomically manipulating and querying data structures such as lists and sets. . The dataset is stored entirely in memory and periodically flushed to disk. Description-md5: 9160ed1405585ab844f8750a9305d33f Homepage: http://redis.io/ Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubunt 
$ dpkg -l nginx Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-========================================-=========================-=========================-===================================================================================== ii nginx 1.6.2-1~trusty amd64 high performance web server 

Источник

Читайте также:  Linux block device driver

How can I check the available version of a package in the repositories?

How can I check the version of the available package in the Ubuntu repositories without installing it?

7 Answers 7

This gives you information of all available package versions.

alaa@aa-lu:~$ apt-cache policy vlc vlc: Installed: 2.0.8-0ubuntu0.13.04.1 Candidate: 2.0.8-0ubuntu0.13.04.1 Version table: *** 2.0.8-0ubuntu0.13.04.1 0 500 http://ae.archive.ubuntu.com/ubuntu/ raring-updates/universe i386 Packages 500 http://security.ubuntu.com/ubuntu/ raring-security/universe i386 Packages 100 /var/lib/dpkg/status 2.0.6-1 0 500 http://ae.archive.ubuntu.com/ubuntu/ raring/universe i386 Packages
  • From the output, you can see that there are two versions available: 2.0.8-0ubuntu0.13.04.1 and 2.0.6-1 . It also tells you which repositories they are coming from.
  • Installed: tells you the version you have installed. If you don’t have the package installed, you’ll see (none) .
  • Candidate: is the version that will be installed if you use apt-get install vlc . If you want to install the other version, you would do apt-get install vlc=2.0.6-1 .

Go to packages.ubuntu.com, fill in the search form and get a nice view of the package including the version.

enter image description here

enter image description here

Additional benefits

  • Will also list versions of packages for other versions of Ubuntu. Eg. if you want to know about the version of the package in Raring (13.04), but your system still has Precise (12.04), then this will provide a way to find it out.
  • You don’t even need Ubuntu to be installed.

Biggest downside is that it won’t list the versions of other repositories you possible have installed, such as PPAs. You will then need the apt-cache policy approach as already posted.

Pro tip

Take the shortcut — just browse to http://packages.ubuntu.com/packagename and replace packagename with the name of the package you want to query.

Читайте также:  Линукс операционная система какая страна

It also gives information about all available package versions in the repositories. This command output had the syntax like this:

packageName | Version | Repository 

apt-cache’s madison command attempts to mimic the output format and a subset of the functionality of the Debian archive management tool, madison. It displays available versions of a package in a tabular format. Unlike the original madison, it can only display information for the architecture for which APT has retrieved package lists (APT::Architecture).

$ apt-cache madison chromium-browser chromium-browser | 32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy-updates/universe amd64 Packages chromium-browser | 32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy-security/universe amd64 Packages chromium-browser | 29.0.1547.65-0ubuntu2 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy/universe amd64 Packages chromium-browser | 29.0.1547.65-0ubuntu2 | http://archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages chromium-browser | 29.0.1547.65-0ubuntu2 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy/universe Sources chromium-browser | 32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy-updates/universe Sources chromium-browser | 32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy-security/universe Sources chromium-browser | 29.0.1547.65-0ubuntu2 | http://archive.ubuntu.com/ubuntu/ saucy/universe Sources chromium-browser | 29.0.1547.65-0ubuntu2 | http://archive.ubuntu.com/ubuntu/ saucy/universe Sources 

Источник

Check Available Version of a Package in Ubuntu

There are several ways to determine the version number of an available package in Ubuntu. The command line provides quick access to the available packages in Ubuntu. In this article, we will see how to check the available version of the package in Ubuntu from the command line.

We will explain different methods in this section of checking the Ubuntu package’s available version.

Always make sure to update your system as per the latest version available. So, execute the below command for it:

Now, run the below command to check the available version of the Ubuntu package:

Here, we want to check the available version of firefox using apt-get list available packages. That’s why we have executed the below command:

As the above result suggests, we can use ‘-a’ to get the additional version-related information. So we have executed the following command:

If you need more details about the available package, then use the following command:

Apt Cache Command

If you want to query the APT cache, then please use this command. Apt-cache command gives an operation to find and create appropriate output from the available package metadata. So, run the below command for it:

Читайте также:  Oracle client 11g linux

For example, we will find out all the available versions of the Firefox web browser from the Ubuntu repository. For this, we get the command run by writing “firefox” instead of “package name” in the above command.

After executing the above command, the system will provide brief details on the available version of the Firefox web browser. Along with this, this command also tells us from which repository this version is coming. The output also provides information on whether the package is installed.

In the above image, there are two words named candidate and install.

Installed

It shows us the version which is currently installed in the Ubuntu system.

Candidate

The candidate shows the package of that version in our Ubuntu system, which is to be installed. This example shows the version that we will install the Firefox browser from the Ubuntu repository using apt-get.

Through another command, we can display the package version from the Ubuntu repository. This command is something like this.

To display the version on the repository, we will run a command like this.

If we compare with the previous command, then this command displays the output in a clean format.

Aptitude Command

Ubuntu doesn’t offer aptitude, so please install it through this command:

Now, check the available version of Firefox using the command given below:

Bonus Tip

This method applies specifically to Ubuntu desktops. Visit the Ubuntu packages website using any web browser. Press the search button after entering the name of the package version.

That’s all we need to do. This will display the installation package version available in the Ubuntu repository.

Wrapping Up

This was a brief overview of how to check the available versions of a package in Ubuntu from the command line. We have used specific examples of the Firefox browser so that our readers can understand better. Please visit our official website to learn more new things about Linux.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.

Источник

Оцените статью
Adblock
detector