pacman - errors with expac already existing, then errors on clean cache??
All, devs, During a system update minutes ago, I was hit with two separate pacman errors. The first, /usr/bin/expac and the man1 page already existed in the filesystem prevented update. I removed expac -dd, did the system update, then went to reinstall expac (devtools dependency) and I could not install it for the same errors - the same files continued to exist in the filesystem. So I rm'ed /usr/bin/expac and the man1 man-page and then installed it without issue. What's up with expac?? Second on -Sc to clear the cache I was again hit by errors: 18:04 ragnarok:~> sudo pacman -Sc Packages to keep: All locally installed packages Cache directory: /var/cache/pacman/pkg/ :: Do you want to remove all other packages from cache? [Y/n] removing old packages from cache... error: could not open file /var/cache/pacman/pkg/download-2YRxYx: Error reading fd 7 error: could not open file /var/cache/pacman/pkg/download-wLBLSA: Error reading fd 7 error: could not open file /var/cache/pacman/pkg/download-8iPKGh: Error reading fd 7 Database directory: /var/lib/pacman/ :: Do you want to remove unused repositories? [Y/n] removing unused sync repositories... 18:07 ragnarok:~> su 18:08 ragnarok:/home/david # l /var/cache/pacman/pkg/download-* /var/cache/pacman/pkg/download-2YRxYx: total 240 drwx------ 2 alpm alpm 4096 Dec 18 18:00 . drwxr-xr-x 5 root root 237568 Dec 18 18:07 .. /var/cache/pacman/pkg/download-8iPKGh: total 240 drwx------ 2 alpm alpm 4096 Dec 18 17:57 . drwxr-xr-x 5 root root 237568 Dec 18 18:07 .. /var/cache/pacman/pkg/download-wLBLSA: total 240 drwx------ 2 alpm alpm 4096 Dec 18 17:52 . drwxr-xr-x 5 root root 237568 Dec 18 18:07 .. What is the cause of the empty directories throwing errors on cache cleaning? Do I just need to manually delete the directories? Last update was just about two weeks ago and there were no errors on either issue at that time. Really strange. Not too many times in the past 16+ years that pacman has hiccuped. -- David C. Rankin, J.D.,P.E.
On 12/18/25 7:34 PM, David C Rankin wrote:
All, devs,
During a system update minutes ago, I was hit with two separate pacman errors. The first, /usr/bin/expac and the man1 page already existed in the filesystem prevented update. I removed expac -dd, did the system update, then went to reinstall expac (devtools dependency) and I could not install it for the same errors - the same files continued to exist in the filesystem. So I rm'ed /usr/bin/expac and the man1 man-page and then installed it without issue. What's up with expac??
Second on -Sc to clear the cache I was again hit by errors:
18:04 ragnarok:~> sudo pacman -Sc Packages to keep: All locally installed packages
Cache directory: /var/cache/pacman/pkg/ :: Do you want to remove all other packages from cache? [Y/n] removing old packages from cache... error: could not open file /var/cache/pacman/pkg/download-2YRxYx: Error reading fd 7 error: could not open file /var/cache/pacman/pkg/download-wLBLSA: Error reading fd 7 error: could not open file /var/cache/pacman/pkg/download-8iPKGh: Error reading fd 7
Database directory: /var/lib/pacman/ :: Do you want to remove unused repositories? [Y/n] removing unused sync repositories...
18:07 ragnarok:~> su 18:08 ragnarok:/home/david # l /var/cache/pacman/pkg/download-* /var/cache/pacman/pkg/download-2YRxYx: total 240 drwx------ 2 alpm alpm 4096 Dec 18 18:00 . drwxr-xr-x 5 root root 237568 Dec 18 18:07 ..
/var/cache/pacman/pkg/download-8iPKGh: total 240 drwx------ 2 alpm alpm 4096 Dec 18 17:57 . drwxr-xr-x 5 root root 237568 Dec 18 18:07 ..
/var/cache/pacman/pkg/download-wLBLSA: total 240 drwx------ 2 alpm alpm 4096 Dec 18 17:52 . drwxr-xr-x 5 root root 237568 Dec 18 18:07 ..
What is the cause of the empty directories throwing errors on cache cleaning? Do I just need to manually delete the directories?
Last update was just about two weeks ago and there were no errors on either issue at that time. Really strange. Not too many times in the past 16+ years that pacman has hiccuped.
Since I have moved to btrfs filesystem on all my systems I mount the cache as subvolume, for example UUID=16e070d1-8fa2-4d3c-b278-1e2a9c345aac /var/cache/pacman/pkg btrfs rw,relatime,compress=lzo,discard=async,space_cache=v2,subvol=/Pkgs 0 0 Then if I have issues I either snapshot it and/or create a new subvolume to mount at /var/cache/pacman/pkg. Before I make a mess ;) I can mount it into other containers, or across the network, ie shared to multiple machines/containers. It is also good practice to snapshot the Root volume before upgrading, that way if things go south I can quickly restore it. I remove the snapshot when I am satisfied that all is well. With the btrfs filesystem top level mounted at /mnt btrfs subvolume list /mnt ID 256 gen 24056 top level 5 path Root <-- root system ID 257 gen 24057 top level 5 path Home <-- home directories at /home ID 258 gen 24037 top level 5 path Pkgs <-- pacman package cache ID 259 gen 10056 top level 256 path Root/var/lib/portables ID 260 gen 10056 top level 256 path Root/var/lib/machines ID 286 gen 10056 top level 5 path Nginx <-- nspawn container running ngix ID 287 gen 10056 top level 286 path Nginx/var/lib/portables ID 288 gen 10056 top level 286 path Nginx/var/lib/machines I have not seen empty directories on any of my machines -- Hindi madali ang maging ako
On Thu, 2025-12-18 at 18:34 -0600, David C Rankin wrote:
error: could not open file /var/cache/pacman/pkg/download-2YRxYx: Error reading fd 7
Hi, I also encountered some of these errors. In my case, these “download-*” directories were empty. I haven't written an error report yet, as I assumed it might be due to the AUR helper I was using. A rather poorly mummified Yahourt 𓀡. I haven't had time to look into it yet, so I assumed I would have to fix the mummy's bandages again or hand it over to a museum. Regards, Ralf
PS: Steps to reproduce... 1. run $ sudo pacman -Sc Everything should still be fine. 2. run $ sudo pacman -U https://ftp.sh.cvut.cz/arch/core-testing/os/x86_64/linux{,-docs,-headers}-6.18.2.arch2-1-x86_64.pkg.tar.zst 3. After that... $ sudo pacman -Sc Packages to keep: All locally installed packages Cache directory: /var/cache/pacman/pkg/ :: Do you want to remove all other packages from cache? [Y/n] removing old packages from cache... error: could not open file /var/cache/pacman/pkg/download-1HaVIU: Error reading fd 7 Database directory: /var/lib/pacman/ :: Do you want to remove unused repositories? [Y/n] removing unused sync repositories... In other words, it is a problem with pacman -U. $ sudo rmdir /var/cache/pacman/pkg/download-1HaVIU $ sudo pacman -Sc Packages to keep: All locally installed packages Cache directory: /var/cache/pacman/pkg/ :: Do you want to remove all other packages from cache? [Y/n] removing old packages from cache... Database directory: /var/lib/pacman/ :: Do you want to remove unused repositories? [Y/n] removing unused sync repositories...
On Friday, December 19, 2025 7:15:12 AM Central European Standard Time Ralf Mardorf wrote:
I haven't written an error report yet, as I assumed it might be due to the AUR helper I was using. A rather poorly mummified Yahourt 𓀡. I
May I suggest `paru`, which you can use as a drop-in replacement, but is much safer out of the box and supports building in clean chroots as well (which is a good practice) :) Cheers und Frohes Fest, Bennett
participants (4)
-
Bennett Piater
-
David C Rankin
-
Pocket
-
Ralf Mardorf