Say I have python-twisted installed.
sudo apt-get -V check python-twisted
does not show the version number, just
Reading package lists... Done
Building dependency tree
Reading state information... Done
How do I get apt-get to print the currently installed version number for an application?
Answer
apt-get
is the wrong tool for that.
dpkg -l python-twisted
shows the version number as part of a human-friendly listing with possibly truncated columns. For parseable output, use dpkg-query -W python-twisted
, or dpkg-query -W -f '${version}\n' python-twisted
to get just the version number.
apt-cache policy python-twisted
shows what version of the package is installed as well as any version that is available for installation.
These are all about deb package versions, not python library module versions. The package version often follows the library module version, but it's not an obligation.
No comments:
Post a Comment