Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Learn how Pacman works in Arch Linux, how to install, update, remove and search packages, manage dependencies, clean the package cache, troubleshoot common errors and safely maintain a rolling Arch Linux system.
Pacman is the core package-management utility used by Arch Linux. From installing software and resolving dependencies to performing complete system upgrades, package searches and local package management, understanding Pacman is essential for administering Arch Linux.
pacman -S to install packages from configured
repositories.
pacman -Syu for a complete system upgrade.
Pacman is the package-management utility at the center of Arch Linux software management. It handles package installation, removal, upgrades, dependency resolution and synchronization with configured repositories.
ArchWiki describes Pacman as one of the major distinguishing features of Arch Linux. It combines Arch’s binary package format with dependency handling and repository synchronization.
The official Arch manual describes Pacman as a package-management utility that tracks installed packages, supports dependencies and package groups, and can synchronize the local system with remote repositories.
Pacman communicates with the repositories configured in
/etc/pacman.conf. Repository definitions specify
where package databases and packages can be obtained.
Pacman uses the Arch Linux Package Management library,
libalpm, underneath the command-line interface.
The library provides the package-management functionality used
for dependency resolution, transactions and package handling.
Pacman synchronizes package metadata from configured repositories.
Pacman determines package dependencies required for a transaction.
Required package archives are retrieved from configured repository mirrors.
Pacman installs, upgrades or removes packages as part of a managed transaction.
The basic Pacman command structure is:
pacman <operation> [options] [targets]
The operation determines what Pacman should do, options modify the behavior and targets usually identify packages, package files or search terms.
| Option | Purpose | Example |
|---|---|---|
-S |
Synchronize/install packages | pacman -S firefox |
-R |
Remove packages | pacman -R firefox |
-Q |
Query installed packages | pacman -Q |
-F |
Query files in sync databases | pacman -F filename |
-U |
Install a local package file | pacman -U package.pkg.tar.zst |
The most common Pacman operation is installing software from an enabled Arch Linux repository.
sudo pacman -S firefox
Replace firefox with the package you want to install.
sudo pacman -S git vim curl wget
Pacman can process multiple package targets in one transaction.
sudo pacman -S package-name
If the requested package is already installed, Pacman may ask whether you want to reinstall it depending on the transaction context.
sudo pacman -S --needed package-name
The --needed option prevents reinstalling targets
that are already up to date.
Arch Linux follows a rolling-release model. Packages are updated continuously rather than through traditional major-version upgrades.
The standard command for a complete system upgrade is:
sudo pacman -Syu
The command synchronizes repository databases and then upgrades installed packages to the versions available from the configured repositories.
pacman -Sy and then install or upgrade individual
packages from the newly synchronized databases. Use the normal
full-system upgrade workflow instead.
Arch Linux repositories are maintained as coherent repositories. Packages can depend on particular versions of libraries and other components, so selectively upgrading parts of a system can create dependency inconsistencies.
Before significant upgrades, check the official Arch Linux news for manual-intervention announcements. ArchWiki specifically recommends checking Arch news before updating when manual intervention may be required.
pacman -Ss keyword
For example:
pacman -Ss virtualization
pacman -Qs keyword
For files belonging to already installed packages, use:
pacman -Qo /usr/bin/example
Pacman’s file-database operation can search synchronized file databases:
pacman -F filename
The file database needs to be synchronized before it can provide current results.
sudo pacman -Fy
sudo pacman -R package-name
sudo pacman -Rs package-name
The -s option can remove dependencies that are no
longer required by other installed packages.
sudo pacman -Rns package-name
pacman -Qi package-name
pacman -Si package-name
pacman -Ql package-name
pacman -Qo /path/to/file
pacman -Qe
pacman -Qm
Foreign packages are packages not found in the currently synchronized repositories. This can include packages installed from the AUR or manually installed package files.
Pacman can install a locally available package archive using
the -U operation.
sudo pacman -U package.pkg.tar.zst
This is useful when you have obtained a package archive from a trusted source and want Pacman to perform the installation.
Pacman normally keeps downloaded package archives in its package cache. The cache can be useful when you need to reinstall a package or recover from certain situations.
ls -lh /var/cache/pacman/pkg/
The paccache utility from the
pacman-contrib package is commonly used for
controlled cache maintenance.
sudo paccache -r
sudo paccache -rk2
This keeps two cached versions of installed packages.
Pacman’s main configuration file is:
/etc/pacman.conf
The configuration defines global options and repository sections.
The official pacman.conf(5) documentation describes
the file as the configuration source Pacman reads whenever it
runs.
sudo less /etc/pacman.conf
| Section | Purpose |
|---|---|
[options] |
Global Pacman behavior. |
[core] |
Official core repository configuration. |
[extra] |
Official extra repository configuration. |
[multilib] |
Optional 32-bit compatibility repository when enabled. |
Repository configuration can change over time, so always compare your current configuration with current ArchWiki documentation before making major repository changes.
Pacman obtains binary packages from repositories configured in
/etc/pacman.conf. Arch Linux’s official repositories
are maintained by Arch package maintainers and packages are
continuously upgraded as upstream software changes.
Contains essential packages required for booting, networking, system setup and other core functionality.
Provides a large collection of additional officially maintained software.
Provides 32-bit libraries and applications on supported 64-bit Arch Linux installations.
A community repository of PKGBUILDs. AUR packages are not official binary repository packages.
Pacman and the Arch User Repository are related but they are not the same thing.
Pacman directly manages packages from configured repositories. The AUR is a community-maintained collection of PKGBUILDs used to build packages.
| Feature | Official Repository | AUR |
|---|---|---|
| Maintained by | Arch package maintainers | Community contributors |
| Package format | Prebuilt binary package | PKGBUILD used to build a package |
| Direct Pacman install | Yes | Not directly from the AUR website |
| Trust model | Official Arch repositories | Community-provided build recipes |
VMoreCloud has also covered modern Arch package-management development in: Shelly 3.1.5: Arch Linux Package Manager Expands AUR Support .
Pacman downloads packages from repository mirrors configured through the Arch Linux mirror configuration.
Mirror selection can affect download performance and reliability. Mirror order also determines which servers Pacman attempts first.
The mirror configuration is commonly maintained in:
/etc/pacman.d/mirrorlist
For a detailed guide to selecting and maintaining Arch Linux mirrors, see:
Reflector can retrieve current Arch Linux mirror information, filter mirrors and generate a new mirrorlist for Pacman.
VMoreCloud also maintains a dedicated guide: How to Install and Configure Reflector on Arch Linux .
First confirm that the package name is correct and that the relevant repository is enabled.
pacman -Ss package-name
You can also search the official Arch Linux package database through the Arch Linux Package Search .
Inspect the repository configuration and mirror availability before attempting destructive database operations.
sudo pacman -Syu
Read the complete transaction output and identify which packages are conflicting. Do not blindly remove packages simply because Pacman reports a conflict.
Signature errors can indicate stale package databases, keyring problems, mirror synchronization issues or other system configuration problems.
Avoid disabling package signature verification as a shortcut. Investigate the actual cause first.
Check your network connection and mirror configuration. VMoreCloud’s Arch Linux mirror guide covers mirror selection and optimization.
If Pacman reports that another process is using the package database, first verify whether another package-management operation is actually running.
ps aux | grep -E 'pacman|yay|paru'
Prefer pacman -Syu instead of creating partial
upgrade situations.
Check official Arch Linux news for manual-intervention instructions before significant updates.
Maintain a sensible mirror configuration and periodically review mirror freshness.
Read Pacman’s proposed package removals, upgrades and dependencies before confirming.
Inspect AUR PKGBUILDs and understand their sources before building community packages.
Back up important configuration and user data before major system changes.
| Task | Command |
|---|---|
| Update system |
sudo pacman -Syu
|
| Install package |
sudo pacman -S package
|
| Install multiple packages |
sudo pacman -S package1 package2
|
| Search repositories |
pacman -Ss keyword
|
| Search installed packages |
pacman -Qs keyword
|
| List installed packages |
pacman -Q
|
| Package information |
pacman -Qi package
|
| Repository information |
pacman -Si package
|
| List package files |
pacman -Ql package
|
| Find package owning a file |
pacman -Qo /path/to/file
|
| Remove package |
sudo pacman -R package
|
| Remove package and unused dependencies |
sudo pacman -Rs package
|
| Install local package |
sudo pacman -U package.pkg.tar.zst
|
| Show explicitly installed packages |
pacman -Qe
|
| Show foreign packages |
pacman -Qm
|
Pacman is the primary package-management utility for Arch Linux. It installs, upgrades, removes and queries packages and manages dependencies for repository transactions.
The standard full-system upgrade command is:
sudo pacman -Syu.
Use:
sudo pacman -S package-name.
Use:
sudo pacman -R package-name.
If you also want to remove dependencies that are no longer
required, -Rs can be used after reviewing the
proposed transaction.
Search synchronized repositories with:
pacman -Ss keyword.
Pacman directly manages packages from configured repositories. The AUR contains community-maintained PKGBUILDs that users build into packages.
Do not use pacman -Sy by itself as a routine
update method. Arch Linux recommends full-system upgrades;
use pacman -Syu for normal updates.
The paccache utility from
pacman-contrib can be used to remove older cached
package versions while retaining selected versions.
The primary Pacman configuration file is
/etc/pacman.conf. The repository mirror list is
commonly maintained separately under
/etc/pacman.d/mirrorlist.
Pacman is strongly associated with Arch Linux and its package ecosystem, although other distributions and projects can use the Arch package-management technology or compatible tooling.
Pacman is one of the most important tools to understand when working with Arch Linux. It provides the interface for installing software, removing packages, querying the system, resolving dependencies and keeping a rolling Arch Linux installation synchronized with its repositories.
The most important command for everyday administration is:
sudo pacman -Syu
Beyond that command, administrators should become comfortable with package searching, package information, removal operations, local package installation, cache management, repository configuration and mirror maintenance.
Pacman also provides the foundation for understanding the broader Arch Linux ecosystem. Once the basics are familiar, topics such as the AUR, PKGBUILDs, makepkg, custom repositories, Reflector and advanced package troubleshooting become much easier to understand.
Start with Pacman, then expand into Arch Linux installation, mirror optimization, Reflector, AUR package management and system administration.
Read the Arch Linux Installation GuideWe have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.