Introducing yay v12.0.0 - probably the biggest update in the last five years. This release prioritizes the improvement of yay’s maintainability and testability, with an added focus on enhancing the user experience and making the tool more error-resistant.

While there are numerous small tweaks and improvements, here are some of the key highlights of this version.

Build a PKGBUILD in a given directory

In yay v12, building a local PKGBUILD in a given directory is now possible.

You can use the following command:

yay -Bi <path/to/directory/containing/PKGBUILD>

This command will search for and install any missing dependencies for the PKGBUILD. Here’s an example of how to use this command:

  1. Download the votar-git AUR PKGBUILD repo
1
git clone https://aur.archlinux.org/votar-git.git
  1. Build the PKGBUILD
1
yay -Bi ./votar-git

This will build the votar-git package in the current directory, while also resolving and installing any missing dependencies.

New install engine and dependency resolution algorithm

During this development cycle, the longest period was devoted to redesigning and reimplementing yay’s dependency resolution and install engine. The previous engine had accumulated significant technical debt over the past five years, making it difficult to modify and test new features such as yay -Bi.

To address these issues, the new install engine and dependency resolution algorithm were designed with a focus on resilience, ease of testing, and ease of debug. This effort aimed to streamline future development and make it easier to maintain and improve yay going forward.

Graph for the jellyfin AUR package by the new dependency resolver

A blog post will soon be posted on the architecture of the new install system as technical documentation and technical vision for aspiring contributors.

As a result of these changes, you may notice subtle differences in default options, question order, and confirm prompts. Additionally, some flags, such as --nocombinedupgrade and --nobatchinstall, no longer work in the new engine.

  • --nocombinedupgrade – The new engine always performs combined upgrades (unlike the legacy engine the upgrade is always run with -Syu avoiding partial upgrades)
  • --nobatchinstall – The new engine will always try to batch install packages.

yay 12.0.4 reintroduces --nocombinedupgrade for yay -Syu, handling all repository updates before running yay’s upgrade and dependency gathering.

Troubleshooting

Since this is a big change it is still possible to use the legacy engine for this version in case you find issues when installing a specific package that used to work.

To enable the legacy engine ensure your ~/.config/yay/config.json includes this key:

1
2
3
{
  "newinstallengine": false
}

Note that later versions of yay may not include the legacy engine, so please open an issue in the issue tracker if you encounter any problems.

AUR metadata client

The RPC Client continues to be the default and recommended client for AUR queries.

The AUR metadata client is an alternative to the RPC client for interacting with the AUR. Instead of querying the AUR directly, the metadata client downloads an archive with a snapshot of the AUR metadata (around 6MB archived and 50MB extracted) and executes queries over it. This approach supports larger queries and does not rate limit requests.

Yay updates the cached metadata if the locally cached version is older than one hour. Examples of queries that work differently in the AUR metadata client than in the RPC client at this current time include:

yay -Ss --searchby provides WIREGUARD-MODULE

yay -Ss --searchby namedesc python

The first query searches for packages that provide the wireguard module, while the second searches for packages with “python” in the name or description.

The first query returns no results and the second may return too many results for the RPC interface but both work well with the metadata client.

To enable the AUR metadata client, add the following key to your ~/.config/yay/config.json file:

1
2
3
{
  "rpc": false
}

This will tell yay to use the metadata client instead of the RPC client for AUR queries.

Regex AUR searching

Only available using AUR metadata client

Starting from yay v12, you can perform AUR package searches using regular expressions when using the AUR metadata client. This enables more powerful and flexible queries.

Here’s an example of how to search for packages with names that start with python followed by either 2 or 3 and then any digit:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
$ yay -Ss "^python[23]\d"
...
aur/python312-as-default-interpreter 1-1 (+0 0.00) 
    Add necessary linking to make the python312 package the default interpreter; remove the 'python' package by conflicting it
aur/python312 3.12.0a6-1 (+1 0.21) 
    Major release 3.12 of the Python high-level programming language
aur/python311 3.11.2-1 (+6 0.50) 
    Major release 3.11 of the Python high-level programming language
aur/python39 3.9.16-2 (+18 0.60) 
    Major release 3.9 of the Python high-level programming language
aur/python38 3.8.16-3 (+26 0.16) 
    Major release 3.8 of the Python high-level programming language
aur/python37 3.7.16-1 (+31 0.62) 
    Major release 3.7 of the Python high-level programming language
aur/python36 3.6.15-5 (+35 0.00) 
    Major release 3.6 of the Python high-level programming language
aur/python25 2.5.6-4 (+87 0.00) 
    A high-level scripting language

Note that regex searching is only available when using the AUR metadata client, which can be enabled by setting "rpc": false in the config.json file.

Improved search menu ordering

(--separatesources, --noseparatesources)

The two options have been improved to improve the accuracy of searches.

Exact matches will always be displayed first in both modes (as is the case in paru)

In the --noseparatesources (or mixed sources) mode, the results are sorted based on the relevance to the search terms and their confidence level, regardless of the sources. The relevance score is computed using the following formula:

relevance = 0.5 * "similarity of package name" + 0.2 * "similarity of description" + 0.3 * "confidence level"

For packages in repositories, the confidence level is always 1.0, while for AUR packages, it is determined by their votes.

Example yay --separatesources --singlelineresults sd:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
12 extra/sdl2_image 2.6.3-1 (66.1 KiB 199.4 KiB) (Installed)	A simple library to load images of various formats as SDL surfaces (Version 2)
11 extra/sdl2_mixer 2.6.3-1 (154.3 KiB 394.0 KiB) (Installed)	A simple multi-channel audio mixer (Version 2)
10 extra/sdl2_net 1:2.2.0-1 (19.4 KiB 62.5 KiB) 	A small sample cross-platform networking library (Version 2)
9 extra/sdl2_ttf 2.20.2-1 (634.1 KiB 1.5 MiB) (Installed)	A library that allows you to use TrueType fonts in your SDL applications (Version 2)
8 extra/sdl2_gfx 1:1.0.4-3 (32.8 KiB 95.7 KiB) 	SDL graphics drawing primitives and other support functions (Version 2)
7 extra/sddm-kcm 5.27.3-1 (111.4 KiB 454.8 KiB) [plasma] 	KDE Config Module for SDDM
6 extra/sbcl 2.3.1-1 (14.0 MiB 77.1 MiB) 	Steel Bank Common Lisp
5 extra/sdl2 2.26.4-1 (987.1 KiB 4.4 MiB) (Installed)	A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2)
4 extra/sddm 0.19.0-9 (3.4 MiB 4.4 MiB) 	QML based X11 and Wayland display manager
3 core/ding-libs 0.6.2-1 (124.8 KiB 655.2 KiB) (Installed)	"DING is not GNU" helper libraries for SSSD and FreeIPA
2 core/sdparm 1.12-1 (165.5 KiB 484.7 KiB) 	An utility similar to hdparm but for SCSI devices
1 community/sd 0.7.6-2 (595.9 KiB 1.8 MiB) 	Intuitive find & replace

Example yay --noseparatesources --singlelineresults sd:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
12 aur/sdx 20110317-1 (+16 0.04) 	A utility for making and unpacking starkits.
11 community/sdl_ttf 2.0.11-6 (16.2 KiB 41.3 KiB) (Installed)	A library that allows you to use TrueType fonts in your SDL applications
10 community/sdl_net 1.2.8-5 (14.0 KiB 40.7 KiB) 	A small sample cross-platform networking library
9 community/sdl_gfx 2.0.26-5 (48.9 KiB 177.1 KiB) 	SDL graphics drawing primitives and other support functions
8 core/sdparm 1.12-1 (165.5 KiB 484.7 KiB) 	An utility similar to hdparm but for SCSI devices
7 community/sdedit 4.2.1-1 (1.6 MiB 1.8 MiB) 	Lightweight sequence diagram editor
6 extra/sdl2 2.26.4-1 (987.1 KiB 4.4 MiB) (Installed)	A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2)
5 extra/sddm 0.19.0-9 (3.4 MiB 4.4 MiB) 	QML based X11 and Wayland display manager
4 community/sdcc 4.2.0-3 (7.9 MiB 317.2 MiB) 	Retargettable ANSI C compiler (Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08)
3 community/sdcv 0.5.4-1 (61.4 KiB 139.8 KiB) 	StarDict Console Version
2 community/sdl12-compat 1.2.60-1 (127.4 KiB 643.4 KiB) (Installed)	SDL 1.2 runtime compatibility library using SDL 2.0
1 community/sd 0.7.6-2 (595.9 KiB 1.8 MiB) 	Intuitive find & replace

AUR Package voting

Available since yay v11.3

You can now vote for or unvote AUR packages using yay commands. To vote for a package, simply run yay -Wv <AUR Package>. Conversely, to unvote, run yay -Wu <AUR Package>.

It’s important to note that setting AUR_USERNAME and AUR_PASSWORD environment variables is required for both voting and unvoting.

This functionality is also available as a separate cli at https://github.com/Jguer/votar.

If you have configured ssh access in your aur.archlinux.org account, you can use ssh aur.archlinux.org vote <name> and ssh aur.archlinux.org unvote <name> for this.

New search by options

Thanks to recent changes in the AUR RPC it is now possible to search AUR packages by new fields such as provides.

Here is the list of the supported search fields in yay v12:

  • name
  • name-desc
  • maintainer
  • depends
  • checkdepends
  • makedepends
  • optdepends
  • provides
  • conflicts
  • replaces
  • groups
  • keywords
  • comaintainers

To search by a specific field, you can use the –searchby option followed by the desired field. For instance, to search for packages that provide yay , you can use:

1
yay --searchby provides yay

What’s next?

You can expect improvements to the new install engine and the deprecation and removal of legacy engine options for the next releases.

Another goal will be the introduction of custom hook scripts when installing AUR packages.

As usual my greatest thanks to all the contributors and users who have helped improve yay and my warmest regards to all pacman/rpc/aur_helper maintainers that keep pushing what’s possible forward and making Arch Linux better every day.