Skip to content

ArchLinux package managers: pacman, pamac, yay

pacman

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

Set pacman mirrors

pacman-mirrors -id

Update database

pacman -Syy

Clear cache

pacman -Scc

Upgrade all installed packages

pacman -Syu


List installed packages

pacman -Q 

Search package by name

pacman -Sq {search-string}

Install package

pacman -S {package} {...}

Remove package

pacman -R {package} {...}

Search file in package

pacman -Qo {file-name}

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

pacman -Qdt

pamac

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

sudo pamac list -f {package}

yay

Install

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

Install package

yay -S {package}

Remove package

yay -R {package}