3 examples for dpkg-query

{{ score }}
  # list installed packages wit "foo" in name with status/arch/version/description 
dpkg-query -l '*foo*'
        
{{ score }}
  # List all files installed by the package 'coreutils':
dpkg-query -L coreutils
        
{{ score }}
  # The Parameter "-S" "searchs for packages that own files 
# corresponding to the given pattern."
#
# "$(which fmt)" is a way to ask for the complete path to fmt
# and may be resolved to "/usr/bin/fmt".
#
# Find the package which owns the already installed program "fmt":
dpkg-query -S "$(which fmt)"