×


Install Yay AUR Helper in ArchLinux

Written in Go programming language, Yay, short for Yet another Yogurt, is an AUR helper that allows users to install and manage packages on an ArchLinux system. During installation, it automates the installation of software packages from PKGBUILDS. Yay replaces Aurman and Yaourt which have long been discontinued. Since its release, Yay has proven to be a remarkable helper and a perfect alternative to the native Pacman package manager.

Yay offers benefits such as advanced dependency solving, downloading PKGBUILDS from AUR and ABS, autocompletion for AUR software packages, and removing any make dependencies when the build process completes.

In a more clearer sense, AUR helper allow users to install AUR packages easily without compiling the packages from source. It automate certain usage of the Arch User Repository. Most AUR helpers can search for packages in the AUR and retrieve their PKGBUILDs – others additionally assist with the build and install process.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Software Installation queries on ArchLinux.

In this context, we shall look into how you can install the Yay AUR helper and and also a few examples of how you can install and manage software packages.

Before you get started, ensure that you have an instance of ArchLinux installed with a sudo user configured to install the software packages.


Steps to Install Yay AUR Helper in ArchLinux

1. Install the base-devel package

To begin, we need to install the base-devel package which provides a set of packages for building or compiling packages from AUR. If you are using a minimal ArchLinux installation, it's probably not pre-installed, so Install it by running the below command:

$ sudo pacman -S --needed base-devel


2. Install Git

Git is a free and open-source version control system that allows you to easily manage and keep track of your code repository. The below command should be executed to install it in your ArchLinux system:

$ sudo pacman -S git


3. Clone the Yay repository

Here, clone the Yay repository from GitHub. We will use the Git version control tool to clown the repository. But first, navigate to the /opt directory:

$ cd /opt

Then clone the Yay repository:

$ sudo git clone https://aur.archlinux.org/yay.git

By default, the cloned yay directory is owned by the root user and belongs to the root group. We need to change the ownership to the logged-in user as follows:

$ sudo chown -R user:user yay-git/


4. Install Yay AUR helper

Finally, to install Yay, navigate into the cloned directory:

$ cd yay-git

And run the command below:

$ makepkg -si

Once installed, confirm the version of yay installed with the below command:

$ yay --version


How to use Yay to install and manage packages ?

With Yay installed, let's take a look at some of the tasks that you can execute.

To update system packages, run the command:

$ yay -Syy

To run a full upgrade of the system including the kernel, issue the command:

$ yay -Syu

To install a software package, use the syntax:

$ yay -S package

For example, to install the Nginx web server, run:

$ yay -S nginx

You can start and check the status of the webserver to ensure that the installation was successful:

$ sudo systemctl start nginx
$ sudo systemctl status nginx

You can also confirm from the web browser by browsing the server's IP:

http://server-ip

To remove a package, use the below syntax:

$ yay -Rns package

For instance, to remove Nginx from the system run the command:

$ yay -Rns nginx

For more on yay command usage, visit the man pages:

$ man yay 


[Need support to fix Nginx configuration issues ? We can help you. ]


Conclusion

This article covers how Yay AUR helper works and to easily install and manage software applications. In fact, Yay is an Aur helper which is Written in the Golang Go language and was developed with minimal dependencies and minimal user input. It performs just as well as Pacman and has an interactive search/install functionality. Also, It allows you to TAB complete, download PKGBUILDs from AUR or  ABS, and locates matching package providers during a search operation.