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