I’m trying to determine whether a package is install on an Ubuntu16 machine, my BigFix Client is version
9.5.12. When I run the following query in the QnA tool, exists base package “X” of debianpackage , it returns true. But when i run ‘apt list --installed’ or ‘dpkg --get-selections’ I can’t see X installed anywhere.
Am I missing something obvious? I’m not too familiar with Ubuntu.
I’m just as inexperienced with Ubuntu but I thought I’d post this example data as I do have a test Ubuntu VM to hand
apt list --installed | grep python3-software-properties
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
python3-software-properties/now 0.96.20.7 all [installed,upgradable to: 0.96.20.8]
Q: (name of it, currently installed of it) of base packages "python3-software-properties" of debianpackage
A: python3-software-properties, True
(name of it | "UnknownName", installed version of it | "0.0.0.0" as version, pkg version of it | "0.0.0.0" as version, currently installed of it | False) of packages of debianpackages
To get the same but only for those that are installed:
(name of it | "UnknownName", installed version of it | "0.0.0.0" as version, pkg version of it | "0.0.0.0" as version) of packages whose(currently installed of it) of debianpackages
I think packages should work but get more results than base packages depending on how specific you want to be.
Ideally we would have inspectors for all debianpackages with the current behavior and also have one for installed debianpackages that only includes those that are currently installed.
One thing that can come up is a package won’t show up in the results until it is installed for the first time, but then when it is uninstalled, it can still show up in the results unless you specifically use whose(currently installed of it)