Yaourt (Yet AnOther User Repository Tool) is (was) a package manager for the Arch Linux distribution, which allowed for the installation of packages from the Arch User Repository (AUR).
Don’t install Yaourt; it’s obsolete software. If you need a package manager for Arch Linux, install and use Yay instead!
Yay is a package manager for Arch, which lets you install AUR packages.
Why Yay? It’s actively developed and easy to install and use.
Installing
To install Yay for Arch Linux, run the following commands:
sudo pacman -Syy sudo pacman -S --needed git base-devel git clone https://aur.archlinux.org/yay.git cd yay sudo makepkg -si
- The first command updates your package databases.
- The second command installs the required dependencies to retrieve and build the Yay code.
- The third command downloads the code from the Yay git repository.
- Fourth changes into the folder where this code is stored
- The fifth and final command builds and runs the Yay installation package.
Once this is done, you’ll see many things happening on-screen – this is the package being compiled and installed.
You might be asked to confirm to continue – go ahead!
Using Yay on Arch Linux
Search and Install Packages
Type the following into your terminal, substitution packagename with the package you want to search for:
sudo yay packagename
You will receive a list of matching packages – enter the number corresponding to the package you want to install to install it.
Install a Specific Package
If you already know the name of the package you want to install, run:
sudo yay -S packagename
Clean up Unneeded Dependencies
To remove packages that are no longer required to stop them clogging up your system, run:
yay -Yc
Remove package
To remove a package, run:
sudo yay -Rns packagename
View System Statistics
To view information on what packages are installed:
sudo yay -Ps
Conclusion
Yay is a great tool and a worthy replacement for Yaourt – give it a go!
If you’re on Ubuntu or Debian, check out our article on using the apt command to manage packages.