Skip to content

ArchLinux package managers: pacman, paru, yay pamac

pacman

Vendor: https://wiki.archlinux.org/title/Pacman#Other_Usage>

Set pacman mirrors

sudo pacman-mirrors -id

Update database

sudo pacman -Syy

Clear cache

sudo pacman -Scc

Upgrade all installed packages

sudo pacman -Syu

List installed packages

sudo pacman -Q 

Search package by name

sudo pacman -Sq {search-string}

Install package

sudo pacman -S {package} {...}

Remove package

sudo pacman -R {package} {...}

Search file in package

sudo pacman -Qo {file-name}

To list all packages no longer required as dependencies (orphans):

sudo pacman -Qdt

paru

Install

sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

Commands the same as in pacman

yay

Install

git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

Install package

yay -S {package}

Remove package

yay -R {package}

pamac - DEPRECATED

Install pamac

pacman -S --needed git base-devel
git clone https://aur.archlinux.org/libpamac-aur.git
cd libpamac-aur
makepkg -si

cd ..
git clone https://aur.archlinux.org/pamac-aur.git
cd pamac-aur
makepkg -si

Clear cache

pamac clean -b

pamac list --orphans
pamac remove --orphans

Get list of files in package

pamac list -f {package}