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
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
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. Continue reading »