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:
- Download the
votar-gitAUR PKGBUILD repo
- Build the PKGBUILD
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
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.
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
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
-Syuavoiding partial upgrades)
--nobatchinstall– The new engine will always try to batch install packages.
yay 12.0.4 reintroduces
yay -Syu, handling all repository updates before running yay’s upgrade and dependency gathering.
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:
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
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:
Note that regex searching is only available when using the AUR metadata client,
which can be enabled by setting
"rpc": false in the
Improved search menu ordering
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
--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.
yay --separatesources --singlelineresults sd:
yay --noseparatesources --singlelineresults sd:
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_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>
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
Here is the list of the supported search fields in yay v12:
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:
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.