Pacman Clear cache error

when run pacman -Sc and type y, i get this errors

error: missing package metadata in /var/cache/pacman/pkg/qt5-base-5.15.2+kde+r254-1-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/qt5-declarative-5.15.2+kde+r36-1-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/xorg-server-1.20.13-4-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/libdbusmenu-qt5-0.9.3+16.04.20160218-6-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/python-3.9.7-2-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/qt5-svg-5.15.2+kde+r13-1-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/qt5-wayland-5.15.2+kde+r36-1-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/polkit-0.120-2-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/nss-3.72-1-x86_64.pkg.tar.zst
error: missing package metadata in /var/cache/pacman/pkg/ark-21.08.3-1-x86_64.pkg.tar.zst.part

I dont know why … but a simple enough fix is to remove those entries in the cache directory manually.

Heck you could just remove everything there if you want:

sudo rm -rf /var/cache/pacman/pkg/*
1 Like

Won’t affect any of my packages right?

Just the cached packages - as in you would not be able to downgrade locally or manually install from there and instead would need to download a new copy. It would have no affect on your actual system beyond that functionality.

Alright thanks, will do that

And it will refill next time you update, or for each new package you install.

Oops. I should have also mentioned the tool for the job when we take care of cache
(I had assumed if pacman cleaning wasnt working we would need to use our hands…)

paccache -rvk3

This would remove everything but the last 3 versions in a cache.
Similarly you could remove everything there, almost identical to what we did above, with

paccache -rvk0

Cheers.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.