I use a custom Extension attribute (not sure who the original person to credit this).
This targets a file of your choice and will result in "Not installed" or report back the specific date/time of the file.
You can then make smart groups that targets "Not Installed" or a specific date of the file.
This assumes the unique date/time information correlates to a specific version of the file
#!/bin/sh
testFile="/path/file"
if [ -f "${testFile}" ] ; then
result=$( /bin/date -j -f "%s" "$(/usr/bin/stat -f "%m" $testFile)" "+%Y-%m-%d %T" )
else
echo "<result>Not Installed</result>"
fi
echo "<result>$result</result>"
exit 0