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.
|Description||Yay (AUR Helper)|
|Root or Sudo Privileges||Yes|
|Host System and Architecture||Manjaro Linux|
|OS Compatibility||Arch, Manjaro, EndeavourOS, etc.|
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 and update your system package database and upgrade installed packages by using the pacman command:
$ sudo pacman -Syu
2. Install “
git” (required to download Yay source code from AUR) and “
base-devel” (install essential development tools and libraries for building AUR packages).
$ sudo pacman -S --needed git base-devel
3. Now, use Git to clone the Yay repository from the AUR:
$ git clone https://aur.archlinux.org/yay.git
4. Enter into the newly cloned Yay directory using the cd command:
$ cd yay
5. Lastly, build and install Yay using the “
$ makepkg -si
-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 (it’s not required) using the following command:
$ cd .. && rm -rf yay
7. Ensure the “
yay” command is accessible from the terminal by checking its version information using the following command:
$ yay --version
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 “
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 -Syu
After 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 -Sua
Check 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 -Qua
Or 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., “
yay firefox” command, it will list the matched packages and allow you to select packages to install.
$ yay firefox #OR $ yay -Ss firefox
Install 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., “
$ yay -S neofetch
Print 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., “
$ yay -Si neofetch
Remove a Package
To remove a package, you can use the “
-R” flag with the “
yay” command followed by the installed package name (e.g., “
$ yay -R neofetch
Clean Package Cache
To clean the package cache and remove the old, unwanted dependencies and leftover packages, run:
$ yay -Sc
Print 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 -Ps
When 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 yay
Yay 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.
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!