How To Check Available Version Of A Package In Ubuntu Repositories

Check Available Version Of A Package In Ubuntu Repositories

The other day 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, even if it is not installed locally. If you ever wondered how to check available version of a package in Ubuntu repositories, read on. It’s not that difficult as you might think. 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: (none)
 Candidate: 65.0.3325.181-0ubuntu1
 Version table:
 65.0.3325.181-0ubuntu1 500
 500 bionic/universe amd64 Packages

As you see in the above output, the latest available version in the remote repository is 65.0.3325.181. This command also indicates in which repositories they are coming from.

You may wonder if the given package is installed or not. It’s easy to find out too.

In the above output, you see two words namely Installed and Candidate.

  • Installed : This will tell you the version that you have currently installed in your Ubuntu system. So, in our case, I didn’t install chromium browser in my Ubuntu, hence it shows none. If it is installed, you will the version number after the term “Installed”.
  • Candidate : This is actual version that will be installed from the Ubuntu repositories when you install Chromium browser using apt-get.

Now let me check another package, say for example firefox.

$ apt-cache policy firefox

Sample output:

 Installed: 59.0.2+build1-0ubuntu1
 Candidate: 59.0.2+build1-0ubuntu1
 Version table:
 *** 59.0.2+build1-0ubuntu1 500
 500 bionic/main amd64 Packages
 100 /var/lib/dpkg/status

See? I have installed Firefox in my Ubuntu and the currently installed version is 59.0.2.

There are also two more 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 yet another command that displays the package version from Ubuntu repositories.

$ apt-cache madison chromium-browser

Sample output:

chromium-browser | 65.0.3325.181-0ubuntu1 | bionic/universe amd64 Packages

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 two 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...

2 Responses

  1. jymm says:

    Sudo apt-get install synaptic. There problem fixed.

    • Logik says:

      Its not that easy. Some times the install command did not ask you for confirmation to istall package before installing it. So just to check version for package, you need not to install it, ehh??

Leave a Reply

Your email address will not be published. Required fields are marked *