Table of Contents

Arch / Artix Linux

Use “yay” instead of yaourt! yaourt is outdated. (https://github.com/Jguer/yay)

Install Yay

Install and Use Yay on Arch Linux

Useful commands

Remove unneeded dependencies using pacman

pacman -Rsn $(pacman -Qdtq)

Remove unneeded dependencies using yay

yay -Yc

Install local pkg.tar in Arch Linux

pacman -U .pkg.tar.gz or .pkg.tar.xz

Create a list of user installed packages without dependencies

Without AUR packages

pacman -Qqen > pkglist.txt

Only AUR packages

pacman -Qqem > pkglist_aur.txt

Install packages with Yay from a list contained in a text file created with the command above

yay -S --needed - < pkglist.txt

Source: https://wiki.archlinux.org/title/Migrate_installation_to_new_hardware

Check which package owns a file

pacman -Qo file

Check which package provides a file

pacman -F file

Show files of a package

pacman -Ql package

Remove a package from Pacman without deleting files

pacman -R --dbonly package