In this brief tutorial, we will see what is Yay AUR helper program, how to install Yay AUR helper in Arch Linux, EndeavourOS, Manjaro Linux, and finally how to install AUR packages using Yay package manager.
Yay - Yet another Yaourt, an AUR Helper written in Go
Yay, stands for yet another yaourt, is a reliable AUR helper written in GO language. It provides an interface for
pacman and also it has almost no dependencies. It provides Yaourt like search feature and minimizes the user input greatly. Another notable feature is you can choose which application to install or update. Also, It supports AUR tab completion, so just type few letters of an AUR package and hit enter KEY to complete the name.
In the past, I was using Pacaur for installing AUR packages. It did a great job and I really liked it. I have also used some other AUR helpers such as Packer and Yaourt as well. But, they are all now discontinued and not recommended to use anymore. After reading the features of Yay, I thought to give "Yay" a try and see how it works. Let us get started!
Install Yay AUR Helper In Arch Linux, EndeavourOS, Manjaro
To install Yay on in Arch Linux and other Arch-based systems, run the following commands one by one.
$ sudo pacman -S --needed git base-devel
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si
Install AUR packages using Yay AUR helper
1. Like any other AUR helpers, the typical way to install a package from AUR is:
$ yay -S <package-name-here>
$ yay -S mplayer
2. To search for a package in AUR and official repositories, use -Ss flag like below.
$ yay -Ss mplayer
aur/animewatch-pyqt5 4.2.0-0 (0) An Audio/Video Manager and Front End for mpv/mplayer with special emphasis on Anime Collection aur/delta-media-player 1.16-3 (0) IPTV program stream player for DMPlayer aur/phonon-mplayer-git 20120714.7217499-1 (0) Mplayer backend for phonon, the multimedia API of KDE. (Qt4 only) GIT version) aur/mplayer-autocmd-git 4.r18.3157ade-1 (0) Per-file options and keybindings for mpv [...]
3. We can view information of a package in AUR or official repositories.
$ yay -Si mplayer
No request type/data specified. [sudo] password for sk: Repository : extra Name : mplayer Version : 37916-2 Description : Media player for Linux Architecture : x86_64 URL : http://www.mplayerhq.hu/ Licenses : GPL Groups : None Provides : None Depends On : desktop-file-utils ttf-font enca libxss a52dec libvpx lirc libx264 libmng libdca aalib libxinerama smbclient jack libmad libcaca libxxf86dga faac faad2 libxvmc mpg123 libcdio-paranoia rtmpdump libdvdnav ffmpeg Optional Deps : None Conflicts With : None Replaces : None Download Size : 2.15 MiB Installed Size : 4.98 MiB Packager : Maxime Gauduin <firstname.lastname@example.org> Build Date : Mon 27 Mar 2017 12:44:49 AM IST Validated By : MD5 Sum SHA-256 Sum Signature
4. To update all packages from AUR and official repositories, use -Syu flag.
$ yay -Syu
5. A good feature of yay is if you pass this command with no operation, then it will display menu for package install selection.
For instance, when I run the following command (Note that there is no operation specified), it shows me the menu for package selection.
$ yay mplayer
I had to type a number to install the respective package. Also, we can specify multiple packages with space-separated.
6. To install any packages without confirmations (without user interventions, of course), use "--noconfirm" option.
$ yay -S --noconfirm <package-name>
7. To print the list of packages that needs to be updated, run:
$ yay -Pu
pywebkitgtk 1.1.8-3 -> 1.1.8-5 webkitgtk2 2.4.11-6 -> 2.4.11-12
8. To remove unwanted dependencies, use -Yc flag as shown below.
$ yay -Yc
checking dependencies... warning: dependency cycle detected: warning: lib32-mesa will be removed after its lib32-libglvnd dependency Packages (34) deepin-qml-widgets-2.3.6-1 go-tools-2:1.10+2306+25101aad-1 gobject-introspection-1.56.1-1 gperf-3.1-1 js-24.2.0-4 lib32-icu-61.1-1 lib32-libdrm-2.4.92-1 lib32-libelf-0.171-1 lib32-libglvnd-1.0.0-1 lib32-libpciaccess-0.14-1 lib32-libxdamage-1.1.4-3 lib32-libxfixes-5.0.3-1 lib32-libxml2-2.9.8-2 lib32-libxshmfence-1.3-1 lib32-libxxf86vm-1.1.4-2 lib32-llvm-libs-6.0.1-1 lib32-lm_sensors-3.4.0-1 lib32-mesa-18.1.3-1 lib32-ncurses-6.1-1 lib32-readline-7.0.003-1 lib32-wayland-1.15.0-1 muparser-2.2.5-3 python-beaker-1.10.0-1 python-dae-1.0.2-1 python-docutils-0.14-1 python-jieba-0.39-1 python-mako-1.0.7-1 python-markupsafe-1.0-1 python-sip-4.19.12-4 python-xlib-0.23-1 python2-sip-4.19.12-4 rust-1:1.27.1-1 setconf-0.7.5-2 sip-4.19.12-4 Total Removed Size: 533.82 MiB :: Do you want to remove these packages? [Y/n] y
9. For more details about yay, refer man pages.
$ man yay
As far as I tested, Yay is fully functioning and works well. I think I am going to stick with Yay for a while.
Update: A new AUR helper named Paru is released by the co-developer of Yay. Check out the following link for details.