Query tool for software packages in Debian Linux
dpkg-query command is a query tool for software packages in Debian Linux. It queries and identifies software package information from the dpkg package database.
dpkg-query(options)(parameters)-l: List software packages matching the matching pattern;
-s: Query the status information of the software package;
-L: Display the list of files installed by the software package;
-S: Query files from installed software packages;
-w: Display software package information;
-c: Display the control file path of the software package;
-p: Display package details.Software package name: Specify the software package to be queried.
Find which package file file1 is installed in:
dpkg-query -S file1List the software installed under ubuntu:
dpkg-query -W --showformat='${Package} ${Version}\n' > filenameView package details:
dpkg-query -s capistranoView the list of files installed to the system during package installation:
dpkg-query -L capistranoList all installed packages:
dpkg-query-lView the exact status of a package (installed or not) and version number:
dpkg-query -W -f='${Status} ${Version}\n' apache-perl