May 122015

Find Version of Packages on CentOS
Every now and then, there arises the necessity for Linux administrators to find out what version of a particular package is running on a CentOS, RedHat or Fedora system.

As is to be expected, the commands to find out which version of a package is installed on RedHat, CentOS and Fedora are different from the commands for Ubuntu and its derivatives like the popular Linux Mint.

There are multiple ways to get the version of packages installed on CentOS, RedHat and Fedora. You can do it via the command line or through GUI utilities.

In this post, we’ll check out five simple methods to determine package version via the command line.

1. The first command line option that comes to mind when checking for the version of an application or package on CentOS  is yum info package_name.

$ yum info PACKAGE_NAME

Let’s see what version of the clamtk anti-virus software is installed on our CentOS 7 desktop.

$ yum info clamtk
Installed Packages
Name        : clamtk
Arch        : noarch
Version     : 5.15
Release     : 1.el7
Size        : 1.3 M
Repo        : installed

2. The yumdb method provides more information compared to the previous option.

$ yumdb info PACKAGE_NAME

With yumdb info, you not only get the package version number but other details such as checksum of the package (and algorithm used to produce it, such as SHA-256), repository, which user installed it, or whether it landed on the system as a dependency.

Let’s check out the yumdb command with an example.

Why not see what version of python is installed on our Linux system.

$ yumdb info python
     checksum_data = b03c388fe3fe1c711249564c96902852d129a0f4faf8a27accd660bf42ebab4e
     checksum_type = sha256
     from_repo = anaconda
     from_repo_revision = 1404557011
     from_repo_timestamp = 1404557037
     installed_by = 4294967295
     reason = dep
     (and more)

3. There’s another easy to remember option, rpm -qa which queries all currently installed packages.

$ rpm -qa PACKAGE_NAME

One of my favorite newsreaders on Linux is quiterss.

In the below command, we’ll see which version of quiterss is installed.

$ $ rpm -qa quiterss

4. Another way to find out version of a package is to grep it with yum list installed.

$ yum list installed | grep PACKAGE_NAME

In the following command, I’m going to check which version of the partitioning software gparted is installed on my CentOS 7 system.

$  yum list installed | grep gparted
gparted.x86_64   0.19.1-5.el7   @epel

5. The final command rpm -qi is a muscleman when it comes to spitting out details on the version of an installed package!

More comprehensive than rpm -q or rpm -qa, rpm -qi displays package information including name, description, release, size, build date, install date, vendor, and other miscellaneous data.

$ rpm -qi PACKAGE_NAME

Let’s demonstrate use of rpm -qi with a concrete example.

Like most of you, I too have the FTP program Filezilla installed on my CentOS 7 system.

Here’s how to check the version of Filezilla installed on a CentOS system.

$ rpm -qi filezilla
Name        : filezilla
Version     :
Release     : 1.el7
Architecture: x86_64
Install Date: Mon 23 Mar 2015 09:39:29 AM EDT
Group       : Applications/Internet
Size        : 12642204
(and more)

As we’ve demonstrated in this post, there are many ways to find out the version of an installed package on CentOS, RedHat or Fedora.

Use the method you’re most comfortable with.

Related Posts:
Which Version of an Application is Running on Ubuntu Linux

Sorry, the comment form is closed at this time.