An installed AUR package no longer exists upstream: "target not found" / "Could not find all required packages"
Checked the four RPC calls live: rpc/v5/info?arg[]=yay&arg[]=nonexistent-pkg-xyz123 returned resultcount 1 with only yay, rpc/v5/search/yay?by=name returned 19 results, and packages.gz serves a bare sorted name list, so the comm one-liner, which is verbatim from the Arch User Repository wiki page, works. The symptom text is wrong for the yay this system ships: the strings 'Could not find all required packages' and '(Target)' do not exist anywhere in the yay v13.0.1 source (the version installed here, pacman -Q yay = 13.0.1-1). pkg/query/aur_warnings.go prints the non-fatal warning 'Packages not in AUR:' for an installed foreign package the RPC no longer knows, and pkg/dep/dep_graph.go prints 'No AUR package found for' when you ask yay -S for a name that is gone. On Omarchy 4 the symptom's opening command, yay -Syu, is blocked: yay formats its pacman call as separate -S -y -u flags (pkg/settings/parser/parser.go) and /usr/bin/omarchy-update-pacman-guard aborts any pacman command line carrying both S and u, so the record needed an Omarchy branch (omarchy update, or yay -Sua which in AUR-only mode never calls pacman -S, cmd.go line 446). The Omarchy note was also wrong about what happens: /usr/share/omarchy/bin/omarchy-update-aur-pkgs (byte-identical to quattro) only runs yay when pacman -Qem lists an explicitly installed foreign package, and its if-body ends in echo, so the script exits 0 whatever yay returned. omarchy update therefore prints the warning and continues, it does not abort at the AUR step. A sibling verdict in this batch claims the opposite (that omarchy-update-aur-pkgs returns yay's exit code) and is wrong. pacman -Qm is the right list of foreign packages (System_maintenance wiki and pacman -Qm here, which is empty on this workstation, so no live yay output could be observed). pacman -S, pacman -S --needed, pacman -Rns and pacman -Ss pass the guard because none carries -u. pactree comes from pacman-contrib, which omarchy-base.packages installs and which is Required By omarchy here. Not exercised: an actual deleted package on a live yay run, and the git clone of a deleted package's repo (the wiki says the repo typically remains).
pacman -Rns on a package other things depend on cascades, so always run pactree -r PKGNAME first and read the removal list. Never edit /var/lib/pacman/local by hand to silence the helper. That corrupts the package database. A deleted AUR package was often deleted for a reason (unmaintained, licensing, malware report). Check the aur-requests mailing list archive before rebuilding it from an old git clone and running its PKGBUILD, which executes arbitrary code on your machine.
Symptom
An installed AUR package that no longer exists in the AUR is reported on every update. With yay 13 (Omarchy 4 ships 13.0.1) the wording is a warning, not an error:
:: Searching AUR for updates...
-> Packages not in AUR: spotify-adblock
You see it from yay -Sua, from yay -Syu on plain Arch, and on Omarchy inside omarchy update under the Update AUR packages heading, which then carries on. Older yay releases printed Could not find all required packages: with the name and (Target). Asking yay for the package by name fails outright:
$ yay -S my-package
-> No AUR package found for my-package
and pacman never searches the AUR at all:
$ sudo pacman -S my-package
error: target not found: my-package
pacman -Qm still lists the package as installed, but https://aur.archlinux.org/packages/<name> returns 404 or lands on a differently named package. On Omarchy 4 yay -Syu itself stops with Woah partner... from the pacman update guard before it gets far, because yay runs pacman -S -y -u underneath. Use omarchy update or yay -Sua there.
Cause
AUR packages get deleted (submission-rule violation, dead upstream, a malware or licence report), merged into another package base, renamed by the maintainer, or adopted into the official extra repository. Your locally built copy stays installed forever, receives no updates, and every helper run flags it: yay asks the AUR RPC for every foreign package and warns Packages not in AUR: for any name the RPC does not return. Separately, pacman -S says target not found for anything that only ever existed in the AUR, because pacman searches only the configured repositories, never the AUR. On Omarchy 4 the AUR step of omarchy update (omarchy-update-aur-pkgs) runs yay -Sua --noconfirm only when pacman -Qem lists an explicitly installed foreign package, and it ignores yay's exit status, so the warning repeats on every update but the update completes. If the AUR is unreachable that step is skipped entirely with AUR is unavailable (so skipping updates) (omarchy-pkg-aur-accessible), so a package that is unreachable and one that is deleted look different.
Fix
**1. List every foreign (non-repo) package and check which ones are gone.** The one-liner is from the Arch User Repository wiki page:
pacman -Qqm
comm -23 <(pacman -Qqm | sort) <(curl -s https://aur.archlinux.org/packages.gz | gzip -cd | sort)
Anything printed no longer exists in the AUR. Packages you built yourself from a local PKGBUILD will be listed too.
**2. For one package, ask the AUR RPC directly.** An empty results array (resultcount: 0) means it is gone:
curl -s 'https://aur.archlinux.org/rpc/v5/info?arg[]=PKGNAME' | head -c 400
**3. Work out where it went:**
# (a) adopted into the official repos
pacman -Ss '^PKGNAME$'
If it is there, refresh and upgrade first so the sync database is current, then install the repo build over your local one. On Omarchy 4 the refresh is omarchy update (a direct pacman -Syu is blocked by the update guard), on plain Arch it is sudo pacman -Syu. Then:
sudo pacman -S PKGNAME # the repo version replaces your local build
# (b) renamed or merged: search by name, then by what it provides
curl -s 'https://aur.archlinux.org/rpc/v5/search/PARTIALNAME?by=name' | head -c 800
curl -s 'https://aur.archlinux.org/rpc/v5/search/PKGNAME?by=provides' | head -c 800
**4. Migrate: install the successor, then drop the stale one.** pactree is in pacman-contrib, which Omarchy installs by default:
sudo pacman -S --needed pacman-contrib
pactree -r OLD-PKGNAME # check nothing else needs it FIRST
yay -S NEW-PKGNAME
sudo pacman -Rns OLD-PKGNAME
**5. If nothing replaced it and you still want it**, the git repo of a deleted AUR package usually survives. Clone it and maintain it yourself:
git clone https://aur.archlinux.org/PKGNAME.git
cd PKGNAME && makepkg -si
**6. If you just want the noise to stop:**
sudo pacman -Rns PKGNAME
**Omarchy 4 note:** omarchy update runs omarchy-update-aur-pkgs, which calls yay -Sua --noconfirm only when pacman -Qem lists an explicitly installed foreign package, and skips the AUR entirely when omarchy-pkg-aur-accessible cannot reach the RPC. The Packages not in AUR: warning does not stop the update, so a deleted package is reported on every run until you migrate or remove it. Do not use yay -Syu on Omarchy: the pacman update guard rejects the pacman -S -y -u it runs underneath. yay -Sua (AUR only, no pacman sync) is fine.
Verify
comm -23 <(pacman -Qqm | sort) <(curl -s https://aur.archlinux.org/packages.gz | gzip -cd | sort) prints nothing (or only packages you deliberately build locally), and yay -Syu completes without Could not find all required packages.
Sources
- https://wiki.archlinux.org/title/Arch_User_Repository
- https://aur.archlinux.org/rpc/v5/info?arg[]=yay
- https://aur.archlinux.org/packages.gz
- https://wiki.archlinux.org/title/System_maintenance
- https://wiki.archlinux.org/title/Aurweb_RPC_interface
- https://aur.archlinux.org/rpc/v5/info?arg[]=yay&arg[]=nonexistent-pkg-xyz123
- https://aur.archlinux.org/rpc/v5/search/yay?by=name
- https://github.com/Jguer/yay/blob/v13.0.1/pkg/query/aur_warnings.go
- https://github.com/Jguer/yay/blob/v13.0.1/pkg/dep/dep_graph.go
- https://github.com/Jguer/yay/blob/v13.0.1/pkg/settings/parser/parser.go
- https://github.com/Jguer/yay/blob/v13.0.1/cmd.go
- https://github.com/basecamp/omarchy/blob/quattro/bin/omarchy-update-aur-pkgs
- https://github.com/basecamp/omarchy/blob/quattro/bin/omarchy-pkg-aur-accessible
- https://github.com/basecamp/omarchy/blob/quattro/bin/omarchy-update