May 122015

Many a time I’m flummoxed as to which version of an application/package is running on my Ubuntu (or Linux Mint) system.

For sure, finding the package version is not an issue when dealing with GUI apps like Libreoffice or the Cherrytree notes app. You just need to open the application and look under ‘about’ on the top menu bar. As simple as that!

Which App Version is Running on Ubuntu?

But for other non-GUI apps like, say the Guake terminal emulator or the Python version on your Ubuntu system, you must head to the command line.

So how do you find out the package version?

Thankfully, the command line provides several options to find out the package version installed on Ubuntu Linux.

On Ubuntu and its derivatives like Linux Mint, there are four ways to find out a package version.

1. The simplest way is the dpkg -l method.

$ dpkg -l PACKAGE_NAME

For instance, I know Cherrytree notes app is installed on my Linux desktop.

Let’s pull down our terminal and see what version of the notes appis running.

$ dpkg -l cherrytree
cherrytree  0.35.7-1~ppa1~trusty1 all  hierarchical note taking application

By the way, dpkg -s PACKAGE_NAME would work fine too.

2. There’s a second distinct method to check the installed version of a package on an Ubuntu, Kubuntu, Lubuntu or Linux Mint system.

$ apt-cache show PACKAGE_NAME

Let’s check out this command and see what version of the Guake terminal I have on my PC.

$ apt-cache show guake
Package: guake
Priority: optional
Section: universe/x11
Installed-Size: 762
Maintainer: Ubuntu Developers 
Original-Maintainer: Sylvestre Ledru 
Architecture: amd64
Version: 0.4.4-1ubuntu1
Provides: x-terminal-emulator

3. Now for the third method of finding out which version of an application is running on Ubunutu (and its derivatives).

$ dpkg --status PACKAGE_Name | grep ^Version

Let’s try an example of the above command with an installed application.

If I wanted to find out the version of quiterss reader on my Ubuntu system, I’d issue the following command.

$ dpkg --status quiterss | grep ^Version
Version: 0.17.7-0ubuntu1~trusty

4. I’ve reserved the best method for last.

Of the various command line techniques available to find out the version of a particular package on Ubuntu, my favorite is apt-cache policy PACKAGE_NAME.

This method not only tells you what version of a package is installed but also if an update is available.

$ apt-cache policy PACKAGE_NAME

Here’s an example.

$ apt-cache policy libreoffice
  Installed: 1:4.2.8-0ubuntu2
  Candidate: 1:4.2.8-0ubuntu2

If the application is not installed, you’ll get none and the version available for installation in the repository.

I don’t have mysql-server installed on my Linux desktop.

So when I run the apt-cache policy command, this is what I get:

$ apt-cache policy mysql-server
  Installed: (none)
  Candidate: 5.5.43-0ubuntu0.14.04.1

I hope you found the various options useful to find the version of an application/package on Ubuntu useful.

Go ahead, try some of these options and see what version of a particular application is installed on your Ubuntu system.

Sorry, the comment form is closed at this time.