
yay: Quick Start for Arch AUR Helpers
What is yay?
yay (Yet Another Yaourt) is a helper that builds and installs packages from the Arch User Repository (AUR) and the official repositories. It wraps pacman and provides convenient features like search, install, and upgrade in one tool.
Quick start: a few commands to know
- Search for a package in repos and AUR:
yay <search_term>
- Install a package from repos or AUR (interactive confirmation):
yay <package_name>
- Install without asking for confirmation (use with care):
yay -S <package> --noconfirm
- Update all packages from repos and AUR:
yay
- Remove a package and its dependencies (plus config):
yay -Rns <package>
- Clean caches for pacman and yay:
yay -Scc
- Show installed package stats and system health:
yay -Ps
Common workflows
Install from AUR with a single command
If you know a package exists in AUR and want to build it from source and install:
yay -S <aur-package>
Notes:
- yay will prompt for missing dependencies and build tools when needed.
- You can also install from the official repos with the same command:
yay -S <repo-package>
Update your system
To update everything (both repos and AUR builds):
yay
If you want to update only AUR-built packages, you might still run:
yay -Sua
Clean caches when space is tight
Old package versions are kept for possible downgrades. Clear caches to reclaim space:
yay -Scc
Useful options and flags
- -S or no flag: install from repos or AUR depending on availability.
- -S
—noconfirm: skip confirmation prompts during install. - -Rns
: remove package, unused dependencies, and config files. - -Ss
: search for a keyword in repos and AUR. - -Yc: remove orphaned packages (dependencies no longer required).
- -Scc: clean caches aggressively (both pacman and yay).
- -Ps: show statistics about installed packages and system health.
Common pitfalls
- Don’t blindly install all AUR packages. Check PKGBUILD quality and trust sources.
- Be careful with —noconfirm: you can trigger large installations or removals quickly.
- If you encounter signature or build failures, ensure your base-devel group is installed and your pacman keys are up to date.
- After changing mirrors or pacman config, consider running a full update to avoid partial upgrades.
Quick troubleshooting tips
- If yay seems slow to fetch or builds stall, run with verbose output:
yay -S --noconfirm <package> --noconfirm --debug
- To re-sync package databases:
yay -Syyu
Further learning
- Read the official yay docs and GitHub page for advanced usage and troubleshooting.
- Compare yay with pacman for basic package management and note how yay augments it with AUR support.
See Also
- What Is chntpw and How Does It Help Manage Windows User Accounts?
- Mastering the emerge Command: The Essential Package Manager for Gentoo Linux
- How to Use the reset Command in Unix/Linux
- ac: Print accounting statistics
- Mastering the wget Command: A Comprehensive Guide
- What Can You Do with the resolvectl Command in Systemd?