We can install package easily in Ubuntu by the apt-get command. But sometimes we may want to find out what packages are available in the repositories as well as the package version.
To search a package, use the apt-cache search <name> command.
For example, apt-cache search nginx
Now we know that we could install the nginx or nginx-light package which has minimal set of core modules.
Next, we want to know the version number of the package which we are going to install. In this case, use the apt-get -s install <name> command.
For example, apt-get -s install nginx-light
It shows that the nginx-light is with version 1.1.19-1.
Reference: StackExchange – Check package version using apt-get/aptitude?