How to Update Yay on Arch: Keeping the Helper and Your AUR Packages Current

How to update yay on Arch Linux, from routine full upgrades to rebuilding yay after a pacman library change, with advice on development packages and safe timing.

How to Update Yay on Arch: Keeping the Helper and Your AUR Packages Current

Yayarch gets this question in two forms. Some people want to know how to update yay itself, the helper program. Others want to know how to use yay to update everything else on an Arch system. The good news is that the same command handles both in nearly every case, but there are a few situations, particularly after major pacman upgrades, where yay needs a hand. This article covers the routine, the exceptions and the habits that make updating on a rolling release calm rather than stressful.

The one command that does almost everything

On its own, typing yay runs yay -Syu. That single command does three jobs in sequence.

First, it synchronises the package databases for every enabled repository, just as pacman -Sy would. Second, it upgrades all repository packages through pacman. Third, it checks every foreign package, meaning those installed from the AUR, against the current AUR versions and offers to rebuild any that have changed.

Because yay is itself an AUR package on plain Arch, it is included in that third step. When a new yay release is published to the AUR, your next full upgrade will offer it alongside everything else. There is no separate update procedure for the helper in normal circumstances.

On distributions such as Manjaro and CachyOS that package yay in their own repositories, yay is updated in the second step instead, as an ordinary repository package.

Reading the upgrade output

A full upgrade prints a running commentary, and it is worth knowing what each part means.

The first lines report database synchronisation, repository by repository. Next you will see yay searching the AUR for updates and, if you have enabled development checks, checking development packages. Yay then lists anything unusual: AUR packages that have vanished from the AUR appear as missing, and packages users have flagged appear as out of date.

After that comes a numbered list of upgrades with old and new version numbers, followed by a prompt asking which packages you want to exclude. You can press enter to upgrade everything, or type numbers, ranges or a repository name. Yay warns that excluding packages may cause partial upgrades and break systems, and that warning is worth heeding.

Finally, yay asks whether you want to review build files for the AUR packages, shows the diffs if you agree, and then builds and installs.

Before you update: three quick checks

Rolling releases reward a little preparation.

Read the Arch news

Occasionally an update needs manual intervention, such as a configuration change or a package replacement. The Arch Linux homepage lists these in its news section. Reading it before a large upgrade takes a minute and can save an evening.

Make sure you have time

Upgrades that rebuild several AUR packages can take a while, especially for large source builds. Avoid starting a big upgrade just before you need the machine for something important.

Check disk space

AUR builds happen in your cache. If space is tight, clear old build files first with yay -Sc.

Updating only AUR packages

Sometimes you want to rebuild AUR packages without touching the repositories, for example right after a full pacman upgrade. The --aur flag limits yay to the AUR.

yay -Sua

To see which AUR packages have updates without installing anything, use the query form.

yay -Qua

Bear in mind that repository and AUR packages often depend on each other. Running AUR-only upgrades as your regular routine can leave things out of step. Use them as a convenience, not a replacement for full upgrades.

Keeping development packages current

Packages whose names end in -git, -hg or -svn build from the latest code in a version control system. Their version number in the AUR often does not change when the upstream code does, so a normal upgrade will not notice new commits.

Yay solves this with its development check. You can run it once:

yay -Syu --devel

Or make it permanent:

yay -Y --devel --save

Yay keeps a small database of the last commit it saw for each development package. If you installed such packages before yay, or with a different helper, run yay -Y --gendb once so that yay starts tracking them properly.

When yay itself breaks after an update

The one situation where updating yay needs special care is a major pacman release. Yay is linked against libalpm, the library that powers pacman. When pacman moves to a new major version, the library's file name changes, for example from libalpm.so.14 to libalpm.so.15 when pacman 7 arrived in 2024. A yay binary built against the old library can no longer start, and you will see an error saying it cannot open the shared object file.

This looks alarming but is easy to fix. The new pacman works perfectly, so you can simply rebuild yay by hand.

git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si

If the precompiled package has not yet been rebuilt for the new library, use the source package instead, replacing yay-bin with yay in the commands above. Building from source always links against the library currently on your system.

After yay is working again, run a normal yay upgrade. Other AUR programs that link against libalpm, such as some package browsers, may need rebuilding in the same way.

Should you update every day?

There is no single right frequency. Many Arch users upgrade daily or every few days, which keeps each upgrade small and makes problems easy to trace. Others upgrade weekly. What matters is consistency and avoiding very long gaps, because upgrading after several months can involve many interlocking changes at once and occasionally requires extra steps such as refreshing the keyring first.

If you have been away for a long time, update the keyring package before the full upgrade.

sudo pacman -Sy archlinux-keyring
yay

That order avoids signature errors caused by packager keys that changed while you were away. It is one of the few cases where a narrow database refresh is followed immediately by a full upgrade, so the system does not stay in a partial state.

Holding back a package temporarily

Occasionally an update introduces a bug that affects you, and you want to keep the previous version until a fix arrives. The cleanest way is pacman's IgnorePkg setting in /etc/pacman.conf, which yay respects. List the package name there, and both pacman and yay will skip it during upgrades while reminding you that it is being ignored.

Remove the entry as soon as the fix is released. Ignoring packages for long periods brings back the partial-upgrade risk the Arch documentation warns about, particularly for libraries.

Cleaning up after updates

Updates leave old package files in pacman's cache and old build files in yay's cache. Over months this can add up to many gigabytes.

  • yay -Sc removes uninstalled packages from the cache and asks before cleaning AUR build directories.
  • yay -Yc removes dependencies that are no longer required, typically build tools pulled in for AUR packages.
  • The paccache utility from the pacman-contrib package can keep a fixed number of recent versions, which is handy if you ever need to downgrade.

Updating safely after the 2026 AUR incidents

Every AUR update is a moment to apply judgement. In 2026, attackers changed the build scripts of more than 1,500 abandoned AUR packages, so updates to orphaned or recently adopted packages deserve a careful look.

Yay version 13 helps by showing how long ago each PKGBUILD last changed. Pay attention to diffs that add new download addresses, run unfamiliar scripts or contain encoded text. If something looks wrong, abort, check the package's AUR comments and wait.

Updating on a laptop versus a server

The right rhythm depends on the machine. On a personal laptop, frequent small upgrades are easy to manage, because you are present to read diffs and to reboot after kernel updates. On a home server or an always-on machine, it is wiser to schedule upgrades for a time when you can watch them complete and check that services restart cleanly.

Automatic, unattended upgrades are a poor fit for AUR packages. Each AUR update deserves a quick look at its diff, and an unattended job cannot do that. If you want reminders rather than automation, small tools in the AUR can notify you when updates are waiting, leaving the decision to upgrade with you.

What to do when an AUR update fails to build

Now and then an AUR package fails during an upgrade, often because a new version of a repository library changed something it relied on. Yay will report the failure and continue with the other packages, or stop if you prefer.

Start by reading the build error. Then open the package's AUR page and read the latest comments, because other users have often posted the cause and a fix within hours. Common outcomes are that the maintainer releases an updated PKGBUILD shortly, or that a forced rebuild with yay -S --rebuild package-name succeeds once dependencies have settled. If a package you rely on stays broken for a long time, look for an alternative package or an official repository version.

Frequently asked questions

How do I update yay to the latest version?

Run yay for a full upgrade. If the AUR has a new yay release, it will be offered with your other updates. On distributions that package yay, it updates through pacman.

Why does yay not show an update I can see on GitHub?

Releases reach the AUR after the maintainer updates the PKGBUILD, which can take a short while. Distribution repositories can lag a little further.

Can I update with pacman instead of yay?

Yes, sudo pacman -Syu updates repository packages. It ignores AUR packages entirely, so you would still need yay for those.

Is it bad to cancel an upgrade halfway?

Cancelling at a prompt is safe. Interrupting while pacman is installing files can leave a lock file behind. Yay 13.1 improved cleanup after interruptions, but check that no package tool is running before removing a lock manually.

How do I check which yay version I have?

Run yay --version. It prints the yay version and the libalpm version it was built against.

Do I need to reboot after updating?

Reboot after kernel, systemd or graphics driver updates. Other updates usually only require restarting the affected application.

Conclusion

How to update yay on Arch comes down to one habit: run yay regularly, read what it shows you and let it upgrade repository and AUR packages together. Use --devel to keep -git packages fresh, -Sua for occasional AUR-only rebuilds and IgnorePkg sparingly. When a major pacman release breaks yay, rebuild it with makepkg and carry on. With those few rules in place, updating stops being a chore and becomes a brief, predictable part of looking after your system.