pacman module manages packages on Arch Linux systems using the pacman package manager.
Functions
packages
Install or remove pacman packages.str | list[str]
List of packages to ensure.
bool
default:true
Whether the packages should be installed.
bool
default:false
Run
pacman -Sy before installing packages.bool
default:false
Run
pacman -Su before installing packages.Package versions can be pinned like pacman:
<pkg>=<version>Example
update
Update pacman package database.upgrade
Upgrade all pacman packages.Common Use Cases
System Setup
Full System Upgrade
Development Environment
Web Server Setup
Desktop Environment
Arch-Specific Tips
Package Groups
Package Groups
Pacman supports package groups which install multiple related packages:
AUR Packages
AUR Packages
For AUR (Arch User Repository) packages, you’ll need to use a helper like
yay or paru:Cleaning Package Cache
Cleaning Package Cache
Clean up old packages from cache:
Orphaned Packages
Orphaned Packages
Remove packages that were installed as dependencies but are no longer needed:
Important Notes
Pacman uses the
--noconfirm flag in pyinfra operations to enable non-interactive installations.