Wednesday, August 28, 2024

displaying info about whether a package is installed or not on Linux command line

Earlier, I had used apt show for info on whether a package is installed or not. Another way - more concise - is to use apt-cache policy - 

$ apt-cache policy unattended-upgrades
unattended-upgrades:
  Installed: 2.3ubuntu0.3
  Candidate: 2.3ubuntu0.3
  Version table:
 *** 2.3ubuntu0.3 500
        500 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.3 500
        500 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 Packages

No comments:

Post a Comment