Home > Article > System Tutorial > Detailed explanation of Linux dpkg-query command usage (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 software package database.
dpkg-query(选项)(参数)
-l:列出符合匹配模式的软件包; -s:查询软件包的状态信息; -L:显示软件包所安装的文件列表; -S:从安装的软件包中查询文件; -<span class="wp_keywordlink">w</span>:显示软件包信息; -c:显示软件包的控制文件路径; -p:显示软件包的细节。
Software package name: Specify the software package to be queried.
Find which package file file1 is installed in:
dpkg-query -S file1
List the list of software installed under ubuntu:
dpkg-query -W --showformat='${Package} ${Version}\n' > filename
View package details:
dpkg-query -s capistrano
View the list of files installed to the system during software package installation:
dpkg-query -L capistrano
List all installed packages:
dpkg-query -l
Check the exact status of the software package (whether installed or not) and version number:
dpkg-query -W -f='${Status} ${Version}\n' apache-<span class="wp_keywordlink">perl</span>
The above is the detailed content of Detailed explanation of Linux dpkg-query command usage (query tool for software packages in Debian Linux). For more information, please follow other related articles on the PHP Chinese website!