Check Debian/Ubuntu Linux package version using apt-get/aptitude command

Check Debian/Ubuntu Linux package version using apt-get/aptitude command

To check the version of a package installed on a Debian or Ubuntu system using the apt-get or aptitude command, you can use the following syntax:

‮efer‬r to:lautturi.com
apt-cache policy <package>

or

aptitude show <package>

Replace <package> with the name of the package you want to check.

For example, to check the version of the nginx package installed on your system, you can run the following command:

apt-cache policy nginx

or

aptitude show nginx

This will display the version of the nginx package that is installed on your system, as well as information about the package's availability and dependencies.

If the package is not installed, the apt-cache or aptitude command will display information about the available versions of the package that can be installed from the package repositories.

You can also use the dpkg command to check the version of a package installed on your system. For example:

dpkg -s <package>

This will display detailed information about the package, including the version number and installed status.

Created Time:2017-10-28 14:02:22  Author:lautturi