dpkg-query
Dpkg-query is a command-line tool used in Debian-based systems for querying information about installed packages. It provides a comprehensive interface to interact with the Debian package management system.
With dpkg-query, you can obtain information about packages, such as their names, versions, architectures, installed sizes, and more.
One of the common uses of dpkg-query is to list all installed packages, which can be useful for system maintenance and troubleshooting.
You can also use dpkg-query to search for specific packages based on their name or other attributes. This helps in finding packages related to a particular functionality or verifying the presence of specific packages.
Additionally, dpkg-query can be used to get detailed information about a specific package, including its dependencies, maintainers, and other metadata.
The tool can list files associated with a package, allowing you to see which files are installed by a particular package or check for the existence of a specific file.
Furthermore, dpkg-query provides options for querying different types of packages, such as those on which no other package depends or those that are not required by any package.
You can use dpkg-query in scripting to automate package-related tasks or extract specific information for further analysis.
Dpkg-query utilizes the dpkg database to access package information, ensuring reliable and accurate results.
Overall, dpkg-query is a powerful and versatile tool for package management in Debian-based systems, providing essential insights into the installed packages.
List of commands for dpkg-query:
-
dpkg-query:tldr:34ae2 dpkg-query: List all installed packages.$ dpkg-query --listtry on your machineexplain this command
-
dpkg-query:tldr:6c82d dpkg-query: List installed packages matching a pattern.$ dpkg-query --list '${libc6*}'try on your machineexplain this command
-
dpkg-query:tldr:7f938 dpkg-query: Search for packages that own files matching a pattern.$ dpkg-query --search ${-etc-ld-so-conf-d}try on your machineexplain this command
-
dpkg-query:tldr:969bf dpkg-query: List all files installed by a package.$ dpkg-query --listfiles ${libc6}try on your machineexplain this command
-
dpkg-query:tldr:c3dd4 dpkg-query: Show information about a package.$ dpkg-query --status ${libc6}try on your machineexplain this command