You are not logged in.
Hello!
I have a strange issue when trying to update
sudo pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (3) gnupg-2.4.7-3 gpgme-2.0.0-1 pacman-7.0.0.r6.gc685ae6-6
Total Download Size: 3.99 MiB
Total Installed Size: 15.57 MiB
Net Upgrade Size: -0.56 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
gpgme-2.0.0-1-x86_64 317.7 KiB 327 KiB/s 00:01 [########################################################################################] 100%
pacman-7.0.0.r6.gc685ae6-6-x86_64 924.5 KiB 788 KiB/s 00:01 [########################################################################################] 100%
gnupg-2.4.7-3-x86_64 2.8 MiB 1826 KiB/s 00:02 [########################################################################################] 100%
Total (3/3) 4.0 MiB 2.34 MiB/s 00:02 [########################################################################################] 100%
(3/3) checking keys in keyring [########################################################################################] 100%
(3/3) checking package integrity [########################################################################################] 100%
(3/3) loading package files [########################################################################################] 100%
(3/3) checking for file conflicts [########################################################################################] 100%
(3/3) checking available disk space [########################################################################################] 100%
:: Processing package changes...
(1/3) upgrading gnupg [########################################################################################] 100%
(2/3) upgrading gpgme [########################################################################################] 100%
error: could not open file /var/cache/pacman/pkg/pacman-7.0.0.r6.gc685ae6-6-x86_64.pkg.tar.zst: No such file or directory
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
And now pacman and pkg directory in /var/cache/pacman are gone...
$ ls -al /var/cache/pacman/pkg/
ls: cannot access '/var/cache/pacman/pkg/': No such file or directory
$ pacman
bash: pacman: command not found
Nothing relevant in pacman.log:
[2025-06-08T17:30:44+0200] [PACMAN] Running 'pacman -Syu'
[2025-06-08T17:30:44+0200] [PACMAN] synchronizing package lists
[2025-06-08T17:30:45+0200] [PACMAN] starting full system upgrade
[2025-06-08T17:30:50+0200] [ALPM] transaction started
[2025-06-08T17:30:50+0200] [ALPM] upgraded gnupg (2.4.7-2 -> 2.4.7-3)
[2025-06-08T17:30:51+0200] [ALPM] upgraded gpgme (1.24.3-2 -> 2.0.0-1)
[2025-06-08T17:30:51+0200] [ALPM] transaction failed
Any idea of what is happening?
Last edited by Teegre (2025-06-08 16:11:35)
Offline
Let me guess, you'd replaced that dir with a symlink instead of just changing the cache dir in the config? When pacman goes to update, it then replaces that symlink with a dir and everything goes to hell. Never, ever replace packaged dirs with symlinks.
You'll need to use an external pacman (pacman-static or from the ISO) to fix this. https://wiki.archlinux.org/title/Pacman … ing_pacman
Offline
Thanks you very much! I could not figure out what was causing this!
Offline