Categories: Ubuntu

Check Available Version of a Package in Ubuntu

There are several ways to determine the version number of an available package in Ubuntu. The command line provides quick access to the available packages in Ubuntu. In this article, we will see how to check the available version of the package in Ubuntu from the command line.

We will explain different methods in this section of checking the Ubuntu package’s available version.

Always make sure to update your system as per the latest version available. So, execute the below command for it:

$ sudo
Sponsored
apt-get update

Now, run the below command to check the available version of the Ubuntu package:

$ apt list packageName>

Here, we want to check the available version of firefox using apt-get list available packages. That’s why we have executed the below command:

$ apt list firefox

As the above result suggests, we can use ‘-a’ to get the additional version-related information. So we have executed the following command:

$ apt list firefox -a

If you need more details about the available package, then use the following command:

$ apt show firefox

$ apt show firefox -a

Apt Cache Command

If you want to query the APT cache, then please use this command. Apt-cache command gives an operation to find and create appropriate output from the available package metadata. So, run the below command for it:

$ apt-cache policy packageName>

For example, we will find out all the available versions of the Firefox web browser from the Ubuntu repository. For this, we get the command run by writing “firefox” instead of “package name” in the above command.

$ apt-cache policy firefox

After executing the above command, the system will provide brief details on the available version of the Firefox web browser. Along with this, this command also tells us from which repository this version is coming. The output also provides information on whether the package is installed.

Sponsored

In the above image, there are two words named candidate and install.

Installed

It shows us the version which is currently installed in the Ubuntu system.

Candidate

The candidate shows the package of that version in our Ubuntu system, which is to be installed. This example shows the version that we will install the Firefox browser from the Ubuntu repository using apt-get.

Through another command, we can display the package version from the Ubuntu repository. This command is something like this.

$ apt-cache madison packageName>

To display the version on the repository, we will run a command like this.

$ apt-cache madison firefox

If we compare with the previous command, then this command displays the output in a clean format.

Aptitude Command

Ubuntu doesn’t offer aptitude, so please install it through this command:

$ sudo apt install aptitude -y

Now, check the available version of Firefox using the command given below:

$ aptitude versions packageName>

Bonus Tip

This method applies specifically to Ubuntu desktops. Visit the Ubuntu packages website using any web browser. Press the search button after entering the name of the package version.

That’s all we need to do. This will display the installation package version available in the Ubuntu repository.

Wrapping Up

This was a brief overview of how to check the available versions of a package in Ubuntu from the command line. We have used specific examples of the Firefox browser so that our readers can understand better. Please visit our official website to learn more new things about Linux.

Ubuntu Server Admin

Recent Posts

How is Livepatch safeguarded against bad actors?

Canonical Livepatch is a security patching automation tool which supports reboot-less security updates for the…

3 hours ago

Accelerating data science with Apache Spark and GPUs

Apache Spark has always been very well known for distributing computation among multiple nodes using…

3 hours ago

Cut data center energy costs with bare metal automation

Data centers are popping up everywhere. With the rapid growth of AI, cloud services, streaming…

1 day ago

Build the future of *craft: announcing Starcraft Bounties!

Our commitment to building a thriving open source community is stronger than ever. We believe…

1 day ago

NodeJS 18 LTS EOL extended from April 2025 to May 2032 on Ubuntu

The clock was ticking: Node.js 18’s upstream End of Life (EOL) The OpenJS Foundation is…

1 day ago

Native integration now available for Pure Storage and Canonical LXD

June 25th, 2025 – Canonical, the company behind Ubuntu, and Pure Storage, the IT pioneer…

2 days ago