← 返回命令列表

Linux command

pacman-query 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

pacman -Q

Example

pacman -Qe

Example

pacman -Qo filename

Example

pacman -Qi package

List

pacman -Ql package

Example

pacman -Qdtq

Example

pacman -Qm

Example

pacman -Qu

说明

pacman -Q (query) queries the local package database on Arch Linux systems. It provides information about installed packages including version, dependencies, files, and installation status.

参数

-Q, --query
Query the local package database
-e, --explicit
Filter to explicitly installed packages only
-d, --deps
Filter to packages installed as dependencies
-t, --unrequired
Filter to packages not required by any other package
-o, --owns _file_
Search for the package that owns the specified file
-i, --info
Display detailed package information
-l, --list
List files owned by the package
-m, --foreign
Filter to packages not found in sync databases (AUR packages)
-n, --native
Filter to packages found in sync databases
-u, --upgrades
Filter to out-of-date packages
-q, --quiet
Show less information (package names only)

FAQ

What is the pacman-query command used for?

pacman -Q (query) queries the local package database on Arch Linux systems. It provides information about installed packages including version, dependencies, files, and installation status.

How do I run a basic pacman-query example?

Run `pacman -Q` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -Q, --query do in pacman-query?

Query the local package database