This guide covers the most common ways to install software on an Arch Linux system — using both official repositories and the AUR (Arch User Repository). Whether you're setting up from scratch or adding missing utilities, you’ll find step-by-step instructions here.
Arch Linux ships with pacman as the default package manager.
pacman -Ss <package_name>Example:
pacman -Ss firefoxsudo pacman -S <package_name>Example:
sudo pacman -S vlcsudo pacman -R <package_name>Remove a package with its dependencies not used by others:
sudo pacman -Rns <package_name>sudo pacman -SyuThis synchronizes and updates all system packages.
sudo pacman -Rns $(pacman -Qtdq)This removes orphaned packages you no longer need.
sudo pacman -SccThis removes cached packages you no longer need.
- ✅ Prefer official repo packages first.
- 🔍 Use
pacman -Qi <package>to check installed package details. - 📦 Use
pacman -Qdtto list orphan packages. - 🕵️ Use
pacman -Ql <package>to list installed files of a package. - 📁 Use
pacman -Qo <file>to find which package owns a file. ⚠️ Be cautious with AUR: read PKGBUILD before installing unknown packages.
| Task | Command |
|---|---|
| Update all system packages | sudo pacman -Syu |
| Search for a package | pacman -Ss |
| Remove a package (with config) | sudo pacman -Rns <pkg> |
| Clean pacman cache | sudo pacman -Sc / sudo pacman -Scc |
| Remove orphan packages | sudo pacman -Rns $(pacman -Qtdq) |
-R→ Just removes the package.-Rs→ Removes the package + dependencies if unneeded.-Rns→ Also removes config files & leftovers (full cleanup).
- Use:
pacman -Ss <keyword>- Or visit https://aur.archlinux.org