How to check the version before installing a package using apt-get?

Yasiru G picture Yasiru G · Sep 19, 2013 · Viewed 166.2k times · Source

I'm thinking to install hylafax+ version 5.5.4 which was release last month on my Debian PC.

I checked dpkg -l | grep "hylafax" and found out that the current version is 5.5.3. Then I checked apt-cache search hylafax and saw the packages are available, but I can't see any version number.

How can I find the version of packages available in the apt-get?

Answer

Yasiru G picture Yasiru G · Sep 19, 2013

OK, I found it.

apt-cache policy <package name> will show the version details.

It also shows which version is currently installed and which versions are available to install.

For example, apt-cache policy hylafax+