Skip to content

Package management in Arch

Update the package databases

sudo pacman --sync --refresh

Update the local database of PGP keys

sudo pacman --sync --needed archlinux-keyring

System Update

sudo pacman -Syu
# or
sudo pacman --sync --sysupgrade

Install/Update a Specific Package

sudo pacman -S package_name

Querying package databases

# search remote package
pacman -Ss string1 string2 ...

# search already install package
pacman -Qs string1 string2 ...

# search for package file names
pacman -F string1 string2 ...

Removing packages

pacman -R package_name

# remove a package and its dependencies
pacman -Rs package_name

Reference