Author's Picture
Author: Joel Gray Published: 26 January 2024 Read Time: ~2 minutes

How to Install Yay AUR Helper on Arch Linux

What is Yay?

Yay stands for “Yet Another Yaourt,” an AUR helper and package manager for Arch Linux and its derivatives. It’s a command-line tool written in the Go language. Here are some key points about yay: Keep in mind that yay is not available in the official Arch repository, so you need to build it from the git repo.

What is the AUR?

The AUR is a community-driven repository for Arch Linux users. It contains package descriptions (PKGBUILDs) that allow users to compile a package from source and install it on their systems. Essentially a massive repository of applications that have been added by the community to make our lives easier.

How to Install Yay

To install yay (Yet Another Yaourt), an AUR (Arch User Repository) helper on Arch Linux, you can follow these steps.

  1. Update Your System:
    Before starting, it’s a good practice to update your system. You can do this with the following command:
sudo pacman -Syu
  1. Install the Required Dependencies:
    Yay is written in the Go language, so you need to install go and other necessary dependencies. These packages include essential tools for building applications source.
sudo pacman -S --needed base-devel git go base-devel
  1. Clone the yay Git Repository
cd /opt
git clone https://aur.archlinux.org/yay.git
  1. Build and Install yay:
    Change into the cloned directory and build the package:
cd yay 
makepkg -si 
  1. Verify the Installation:
    After the installation is complete, you can verify it by checking the version of yay.
yay --version
  1. Using yay:
    Now that yay is installed, you can use it to install packages from the AUR or the official repositories. For example, to install a package from the AUR, you can use:
yay -S name-of-package

Remember, building packages from the AUR can be potentially risky as they are user-produced content. Always check the PKGBUILD and any other relevant files before building and installing AUR packages.