Replace sync databases that pacman reports as 'Unrecognized archive format'
Forum thread 268183 shows the exact error, that deleting the sync files did not help, that the .db files were web pages, and a reply using curl -IL against the mirror that returned a 301 to an unrelated site. The Arch Pacman wiki (raw wikitext retrieved) says to check the sync files with file /var/lib/pacman/sync/*, that a router or proxy can corrupt them into HTML, and to look up the mirror with pacman-conf -r core. On this machine file reports gzip for core/extra/multilib and Zstandard for omarchy.db, pacman-conf -r core prints a Server = line, the mirrorlist holds the single server https://stable-mirror.omarchy.org/$repo/os/$arch, and SigLevel is Required DatabaseOptional. omarchy update runs omarchy-update-keyring (pacman -Sy archlinux-keyring) and omarchy-update-system-pkgs (pacman -Syu), so it re-fetches deleted databases. Not exercised: no database was deleted or re-synced.
Run a full upgrade after re-syncing. Re-syncing the databases and then installing a single package with pacman -S is a partial upgrade.
Symptom
pacman refuses to read its own repository databases:
error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
Deleting /var/lib/pacman/sync/* and syncing again can bring the same error straight back. Opening one of the .db files shows it is a web page.
Cause
The .db files are not archives. The mirror, a redirect, a proxy or a captive portal answered the database request with an HTML page (a parking page, a login page, a moved-permanently target), and pacman saved that page as core.db. When the database signature is checked first the same fault shows as GPGME error: No data, which is a separate record. Here the unsigned database (Arch sets SigLevel = Required DatabaseOptional) is opened directly and the archive library rejects it. Re-syncing against the same bad server fetches the same HTML again.
Fix
Confirm the files are HTML, not compressed data:
file /var/lib/pacman/sync/*.db
A healthy database reads as gzip compressed data or Zstandard compressed data. HTML document confirms this fault. Find the server pacman is using and see what it actually returns:
pacman-conf -r core | grep Server
curl -IL 'https://<mirror>/core/os/x86_64/core.db'
A 301 to an unrelated site, a login page or a text/html content type means that server is the problem. Log in to any captive portal, or comment that Server line out of /etc/pacman.d/mirrorlist (plain Arch) so pacman uses the next one.
Then delete the bad files and do a full sync and upgrade:
sudo rm -f /var/lib/pacman/sync/*.db /var/lib/pacman/sync/*.db.sig
**Omarchy 4:**
omarchy update
**Plain Arch:**
sudo pacman -Syu
On Omarchy 4 the mirrorlist has a single server, https://stable-mirror.omarchy.org/$repo/os/$arch, so there is no second mirror to fall back to. If that server is what returns HTML, wait for it to recover rather than editing the mirrorlist, because omarchy refresh pacman puts it back.
Verify
file /var/lib/pacman/sync/*.db reports compressed data for every repository, and pacman -Ss linux returns results without the error.