====== Arch / Artix Linux ======
Use "yay" instead of yaourt! yaourt is outdated.
([[https://github.com/Jguer/yay]])
===== Install Yay =====
[[https://itsfoss.com/install-yay-arch-linux/|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
===== Links =====
* [[https://bbs.archlinux.org/viewtopic.php?id=95466|Getting a list of packages installed explicitly by me (excluding deps)]]
* [[https://stackoverflow.com/questions/75498183/list-pacman-upgradable-packages-without-version|List pacman upgradable packages without "-version"]]
* [[https://bbs.archlinux.org/viewtopic.php?id=76218|List AUR packages installed and only AUR packages]]