Skip to content

Pacman Command Reference Guide

Essential commands for managing Arch Linux packages with Pacman.

Core Package Management

Install software.

pacman -S

Remove (uninstall) software.

pacman -R

Upgrade software (synchronize and update).

pacman -Syu

Downgrade software (from local cache or package file).

pacman -U /var/cache/pacman/pkg/<package_name>.pkg.tar.zst

Reinstall software.

pacman -S

Remove software and install another in one transaction (using chaining).

pacman -S <package1> && pacman -Rs <package2>

Remove all unneeded packages originally installed as dependencies.

pacman -Rs $(pacman -Qdtq)

Install build dependencies for a package or PKGBUILD file.

makepkg -so

Install debuginfo packages.

pacman -S <package>-debug

Change the reason for an installed package (mark as dependency or explicit).

pacman -D --asdeps <package>

pacman -D --asexplicit <package>

Search and Information

Search for software matching all specified strings.

pacman -Ss

List packages depending on their relation to the system with additional details.

pacman -Si

List packages depending on their relation to the system (locally installed).

pacman -Q

Find what package provides the given value (requires pacman -Fy first).

pacman -F

Search for packages matching various criteria (list all packages in a repo).

pacman -Sl

List groups of installed packages not required by other installed packages (orphans).

pacman -Qdt

Show package changelogs.

pacman -Qc

Print a list of unresolved dependencies for repositories.

pacman -Dk

System Updates and Upgrades

Check for available package upgrades.

pacman -Qu

Upgrade or downgrade installed software to the latest available versions.

pacman -Syu

Prepare the system for an upgrade to a new release (rolling release updates all packages).

pacman -Syu

Repository and Configuration Management

Generate the metadata cache (synchronize package databases).

pacman -Sy

Remove or expire cached data.

pacman -Sc

Transactions and History

Manage transaction history (viewing log).

cat /var/log/pacman.log