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:
Now, run the below command to check the available version of the Ubuntu package:
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:
As the above result suggests, we can use ‘-a’ to get the additional version-related information. So we have executed the following command:
If you need more details about the available package, then use the following command:
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:
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.
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.
In the above image, there are two words named candidate and install.
It shows us the version which is currently installed in the Ubuntu system.
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.
To display the version on the repository, we will run a command like this.
If we compare with the previous command, then this command displays the output in a clean format.
Ubuntu doesn’t offer aptitude, so please install it through this command:
Now, check the available version of Firefox using the command given below:
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.
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.