How To Check Available Version Of A Package In Ubuntu Repositories

Check Available Version Of A Package In Ubuntu Repositories

Today, a friend of mine asked me how to check the latest available version of a package in the Ubuntu repositories. He just wanted to know the package’s version without installing it. I never knew that before, so I immediately went to askubuntu forums, and search for the answer. This is my first preferred site where I regularly search for Ubuntu related help. Luckily, someone has already asked the same question, and got the solution. I wanted to share those instructions for the OSTechNix readers, and keep it myself for future reference.

If you wanted to check available version of a package in Ubuntu repositories, read on. It’s not that difficult. We can do this two methods.

  1. The command line way
  2. Graphical way

1. Check available version of a package in Ubuntu repositories from command line

This is the easiest and quickest way to find a package version from command line.

Open your Terminal, and run the following command:

apt-cache policy <packageName>

For example, let us find out all available versions of Chromium web browser from the Ubuntu repositories.

To do so, run:

apt-cache policy chromium-browser

Sample output:

 Installed: 49.0.2623.108-0ubuntu0.
 Candidate: 49.0.2623.108-0ubuntu0.
 Version table:
 *** 49.0.2623.108-0ubuntu0. 0
 500 trusty-updates/universe amd64 Packages
 500 trusty-security/universe amd64 Packages
 100 /var/lib/dpkg/status
 34.0.1847.116-0ubuntu2 0
 500 trusty/universe amd64 Packages

As you in the above output, there are two versions available 49.0.2623.108, and 34.0.1847.116. This command will also indicates in which repositories they are coming from.

Now, you might ask, is this package (Chromium in our case) is installed or not? It’s easy to find out too.

In the above output, you’ll see there is two words:

  • Installed : This will tell you the version that you have installed in your Ubuntu system. So, in our case, the installed version of Chromium browser is 49.0.2623.108. If the package is not installed, you’ll see (none) in the above output.
  • Candidate : This is actual version that will be installed when you install Chromium browser using apt-get.

There are also other couple of commands available to check the package version from Ubuntu repositories.

apt-cache showpkg chromium-browser

The above command will display the complete details of the package version along with all dependencies.

Here is an another command that displays the package version from Ubuntu repositories.

apt-cache madison chromium-browser

Sample output:

chromium-browser | 49.0.2623.108-0ubuntu0. | trusty-updates/universe amd64 Packages
chromium-browser | 49.0.2623.108-0ubuntu0. | trusty-security/universe amd64 Packages
chromium-browser | 34.0.1847.116-0ubuntu2 | trusty/universe amd64 Packages
chromium-browser | 34.0.1847.116-0ubuntu2 | trusty/universe Sources
chromium-browser | 49.0.2623.108-0ubuntu0. | trusty-updates/universe Sources
chromium-browser | 49.0.2623.108-0ubuntu0. | trusty-security/universe Sources

Unlike the previous command, it will display the output in a neat format.

Well, now let us see the graphical way.

2. Check available version of a package in Ubuntu repositories from Ubuntu site

This method is for Ubuntu desktops. Open your web browser, and go to the following website.

Enter the name of the package version, and hit the Search button.

That’s it. You’ll see the available version of the package from the Ubuntu repositories.

This method has some additional advantages over the command line way.

First, We can search the package version for different Ubuntu releases. For example, you can search the available package version for a trusty version.

Second, you don’t need an Ubuntu system. You can check the version from any distribution. All you need is an Internet connection, and web browser.

Hope this helps. That’s all for now. I will be here soon with another interesting and useful article. Until then, stay tuned with OSTechNix, and please share this article to your social and professional networks.


Thanks for stopping by!

Help us to help you:

Have a Good day!!

You may also like...

  • jymm

    Sudo apt-get install synaptic. There problem fixed.