How to Match Files to Packages
- author:: Nathan Acks
- date:: 2022-07-10
Debian
# List all installed packages
#
dpkg-query -l
# List files in an installed package
#
dpkg-query -L $PACKAGE_NAME
# List the package that owns a particular file
#
dpkg-query -S $FULL_PATH_TO_FILE
- List All Installed Packages on Debian 11
- How do I get a list of installed files from a package?
- How do I find out which package owns a file?
Red Hat
# List all installed packages
#
rpm -qa
# List files in an installed package
#
rpm -ql $PACKAGE_NAME
# List the package that owns a particular file
#
rpm -qf $FULL_PATH_TO_FILE