Software & AppsOperating SystemLinux

How To Check Package Version in Ubuntu Repositories

Ubuntu 17

In this article, we will explore various methods to check the available version of a package in the Ubuntu repositories without installing it. This can be useful in various scenarios, such as when you want to install a specific version of a package or when you want to verify whether a new version of a package is available in the repositories. Let’s delve into the different methods.

Quick Answer

To check the package version in Ubuntu repositories without installing it, you can use the apt-cache policy command, the apt-cache madison command, or the apt-cache show command in the terminal. Alternatively, you can use the Ubuntu Packages website for a graphical interface.

Using the apt-cache policy Command

One of the simplest ways to check the version of a package in Ubuntu repositories is by using the apt-cache policy command. This command provides information about the installed version (if any) and the candidate version. The candidate version is the version that would be installed if you were to use the apt-get install <packageName> command.

Here’s how to use it:

  1. Open your terminal.
  2. Enter the command apt-cache policy <packageName>. Replace <packageName> with the name of the package you’re interested in. For instance, if you want to check the version of VLC, you would enter apt-cache policy vlc.

This command will display information about all available package versions.

Using the apt-cache madison Command

The apt-cache madison command is another useful tool for checking package versions. This command displays available versions of a package in a tabular format, including the repository from which each version is coming.

Here’s how to use it:

  1. Open your terminal.
  2. Enter the command apt-cache madison <packageName>. Replace <packageName> with the name of the package you’re interested in. For example, apt-cache madison chromium-browser.

Using the apt-cache show or aptitude show Command

The apt-cache show and aptitude show commands provide detailed information about a package, including the version. If multiple versions are available, you will see all of them.

Here’s how to use it:

  1. Open your terminal.
  2. Enter the command apt-cache show <packageName> | grep Version or aptitude show <packageName> | grep Version. Replace <packageName> with the name of the package you’re interested in.

To see only the latest version, you can use apt-cache show <packageName> | grep Version | head -1.

Using the Ubuntu Packages Website

If you prefer a graphical interface, you can use the Ubuntu Packages website to check the version of a package.

  1. Go to packages.ubuntu.com.
  2. Fill in the search form with the package name. This will provide a nice view of the package, including the available version.

For example, to check the version of VLC, you would go to packages.ubuntu.com/vlc.

Conclusion

In this article, we have explored several methods to check the version of a package in the Ubuntu repositories. Whether you prefer using the terminal with commands like apt-cache policy, apt-cache madison, or apt-cache show, or you prefer a graphical interface like the Ubuntu Packages website, you have several options at your disposal.

Remember, these methods work for packages in the Ubuntu repositories. If you have additional repositories or PPAs installed, you may need to use the apt-cache policy command to check the versions from those sources. Happy package hunting!

Can I check the version of a package without installing it?

Yes, you can check the version of a package in the Ubuntu repositories without installing it by using commands such as apt-cache policy, apt-cache madison, or apt-cache show.

How do I check the version of a specific package using the `apt-cache policy` command?

To check the version of a specific package using the apt-cache policy command, open your terminal and enter apt-cache policy <packageName>. Replace <packageName> with the name of the package you’re interested in. For example, apt-cache policy vlc will display information about the available versions of VLC.

What information does the `apt-cache madison` command provide?

The apt-cache madison command displays available versions of a package in a tabular format, including the repository from which each version is coming.

How can I use the `apt-cache show` or `aptitude show` command to check the version of a package?

To check the version of a package using the apt-cache show or aptitude show command, open your terminal and enter apt-cache show <packageName> | grep Version or aptitude show <packageName> | grep Version. Replace <packageName> with the name of the package you’re interested in. To see only the latest version, you can use apt-cache show <packageName> | grep Version | head -1.

Is there a graphical interface option to check the version of a package?

Yes, you can use the Ubuntu Packages website at packages.ubuntu.com to check the version of a package. Simply fill in the search form with the package name, and it will provide a nice view of the package, including the available version.

Do these methods work for packages from additional repositories or PPAs?

These methods primarily work for packages in the Ubuntu repositories. If you have additional repositories or PPAs installed, you may need to use the apt-cache policy command to check the versions from those sources.

Leave a Comment

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