Have you wanted to know what version of a particular package/software have you got installed on your Ubuntu? Or while upgrading wanted to compare the version of the package you already have? Or just want to check on the versions of any package before installing them? If you yes to any of the questions then use the below command in the terminal to satisfy your needs.
apt-cache policy <packagename>
Here, <packagename> should be the name of your package.
Example: apt-cache policy kazam