Instantly, install Yay via the following pacman or pamac commands.
$ sudo pacman -S yay
#OR
$ sudo pamac install yayHowever, I advise you to read the entire article in order to gain a deeper understanding, which includes valuable tips on handling packages from AUR using Yay.
Yay (Yet Another Yaourt) is a popular Arch User Repository (AUR) helper for Arch Linux and its derivatives, such as Manjaro, after the discontinuation of Yaourt and Packer.
It is a command-line utility that simplifies the process of searching, installing, and managing packages from both the official repositories and the AUR.
If you donβt know about AUR, In a nutshell, itβs a community-driven repository that contains user-contributed package build scripts. This script allows users to install packages that are not available in the official Arch repositories.
In this article, you will learn how to install Yay on your Arch-based systems, how to use it (with practical examples), and when not to use it.
Tutorial Details
| Description | Yay (AUR Helper) |
| Difficulty Level | Moderate |
| Root or Sudo Privileges | Yes |
| OS Compatibility | Arch, Manjaro, EndeavourOS, etc. |
| Prerequisites | β |
| Internet Required | Yes |
How to Install Yay (AUR Helper) on Arch-Based Systems
Here are the steps to install Yay (the AUR helper) on your Arch-based systems:
1. Open your terminal, refresh the package cache, and update the system by using the pacman command:
$ sudo pacman -Syu2. Install βgitβ (required to clone the Yay git repository) and βbase-develβ (install essential development tools and libraries for building AUR packages).
$ sudo pacman -S --needed git base-develWhen using the β--neededβ flag, it wonβt reinstall packages that are already installed.
3. Now, use the git command to clone the Yay repository from the AUR in your current directory:
$ git clone https://aur.archlinux.org/yay.git4. Once done, switch to the cloned Yay directory using the cd command:
$ cd yay5. Lastly, build and install Yay using the βmakepkgβ utility.
$ makepkg -siThe β-sβ flag is used to automatically resolve and install required Yay dependencies, and the β-iβ flag is used to install the package once itβs built.
6. After the installation is successfully completed, you can delete the Yay directory using the following command:
$ cd .. && rm -rf yay7. Ensure the βyayβ command is accessible from the terminal by checking its version information using the following command:
$ yay --versionOutput:

How to Use Yay in Arch Linux and Manjaro
Once Yay is installed, you can simplify the process of searching, installing, and managing the packages from the AUR repositories. Here are some examples of how to use βyayβ:
Update System and Packages
When you issue the βyayβ command without specifying any flags, it will automatically consider using the βyay -Syuβ command used to update your Arch Linux system. Itβs also equivalent to the βpacman -Syuβ command:
$ yay
#OR
$ yay -SyuAfter issuing the above command, it will update the systemβs package database and upgrade the installed packages.
Update AUR Packages Only
The previously mentioned command will also upgrade the packages installed by Pacman and Yay. If you only want to upgrade packages installed from Yay, run:
$ yay -SuaCheck for Updates
To check for available updates for all installed packages from the βyayβ command without upgrading them, you can use the following command:
$ yay -QuaOr use the βyay -Quβ command to include the pending package update information installed from official repositories.
Search for a Package
To search for a package in the official repositories or AUR repository, you can use the βyayβ command followed by the package name (e.g., βfirefoxβ):
yay firefoxβ command, it will list the matched packages and allow you to select packages to install.$ yay firefox
#OR
$ yay -Ss firefoxInstall a Package
To install a package from the official repositories or AUR repository, you can use the βyayβ command with the β-Sβ flag followed by the package name (e.g., βneofetchβ):
$ yay -S neofetchPrint Package Information
To print the installed or uninstalled package information from the official repositories or AUR, you can use the βyayβ command with the β-Siβ flag followed by the package name (e.g., βneofetchβ):
$ yay -Si neofetchRemove a Package
To remove a package, you can use the β-Rβ flag with the βyayβ command followed by the installed package name (e.g., βneofetchβ):
$ yay -R neofetchClean Package Cache
To clean the package cache and remove the old, unwanted dependencies and leftover packages, run:
$ yay -ScPrint the System Statistics
To check the list of total installed packages, including foreign and explicitly installed packages, the total size occupied by the installed packages, and the total size of the Pacman and Yay caches, run:
$ yay -PsWhen Not to Use Yay or AUR Packages
AUR packages are entirely user-contributed, and while many maintainers are careful, some packages might not be thoroughly reviewed for security issues. Before installing any package from the AUR, you should review the PKGBUILD file (the build script for the package) and inspect the code to ensure its safety.
And most of the packages can be updated frequently, but not all maintainers follow the same update standards as the official repositories. So, installing updates from the AUR might introduce instability or compatibility issues with other system packages. Itβs a good practice to be cautious and only update AUR packages when necessary.
If you have multiple AUR helpers installed on your system, then they might conflict while installing and managing the packages. So, stick to using a single AUR helper to avoid potential issues.
While using AUR helpers like βyayβ can automate certain tasks,Β it might also take away some of the details of package management. If you want more control over the installation process or want to be directly involved in package building, you can choose to manually install AUR packages.
How to Remove Yay (AUR Helper) from Arch-Based Systems
If you do not want to have Yay any more for any reason, you can use the following command to remove it from your Arch-based systems:
$ sudo pacman -Rs yayYay is just a helper to automate the process of downloading, building, and installing packages from the AUR. If you remove βyayβ from your system, the packages that were installed from AUR repositories using βyayβ will remain on your system.
So, if you remove βyayβ, the packages it installed will stay on your system until you explicitly uninstall them using the Pacman package manager. To remove an AUR package without βyayβ, use βpacman -Rsβ followed by the package name.
Final Word
I hope you find this article useful. If you have any questions or queries related to this article, then feel free to ask them in the comment section.
Till then, peace!





Join The Conversation
Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.