LinuxCommandLibrary

pacman-query

Arch Linux package manager utility.

TLDR

List installed packages and versions

$ pacman --query
copy


List only packages and versions that were explicitly installed
$ pacman --query --explicit
copy


Find which package owns a file
$ pacman --query --owns [filename]
copy


Display information about an installed package
$ pacman --query --info [package]
copy


List files owned by a package
$ pacman --query --list [package]
copy


List orphan packages (installed as dependencies but not required by any package)
$ pacman --query --unrequired --deps --quiet
copy


List installed packages not found in the repositories
$ pacman --query --foreign
copy


List outdated packages
$ pacman --query --upgrades
copy

Copied to clipboard