HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pacman --query — Query the local package database. See also: `pacman`. More information: <https://manned.org/pacman.8

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thepacman --querycommandlocaldatabasecliquerypackage
linux

Problem

How to use the pacman --query command: Query the local package database. See also: pacman. More information: <https://manned.org/pacman.8>.

Solution

pacman --query — Query the local package database. See also: pacman. More information: <https://manned.org/pacman.8>.

[Q]uery the local package database and list installed packages and versions:
pacman -Q


List only packages and versions that were [e]xplicitly installed:
pacman -Qe


Find which package [o]wns a file:
pacman -Qo {{filename}}


Display information about an [i]nstalled package:
pacman -Qi {{package}}


Display the [l]ist of files owned by a specific package:
pacman -Ql {{package}}


List orphan packages (installed as [d]ependencies but unrequired ([t]) by any package and print in [q]uiet mode (only package name is displayed)):
pacman -Qdtq


List installed packages foreign ([m]) to the repository database:
pacman -Qm


List packages that can be [u]pgraded:
pacman -Qu

Code Snippets

[Q]uery the local package database and list installed packages and versions

pacman -Q

List only packages and versions that were [e]xplicitly installed

pacman -Qe

Find which package [o]wns a file

pacman -Qo {{filename}}

Display information about an [i]nstalled package

pacman -Qi {{package}}

Display the [l]ist of files owned by a specific package

pacman -Ql {{package}}

Context

tldr-pages: linux/pacman --query

Revisions (0)

No revisions yet.