How can I find the version number of an installed package via dpkg?
dpkg -s <packagename> | grep '^Version:'
e. g.:
dpkg -s network-manager | grep '^Version:'
Sample output:
Version: 0.8.1+git.20100810t184654.ab580f4-0ubuntu2
dpkg-query --showformat='${Version}' --show python3-lxml
It's not using the dpkg
command but apt-show-versions
Example:
$ apt-show-versions network-manager
network-manager/maverick uptodate 0.8.1+git.20100810t184654.ab580f4-0ubuntu2