Pacman cache not clearing

my disc storage analyzer app used to say that my pacman cache directory was 8GB. It seemed kinda weird to me, since I configured the EOS welcome utility app to automatically clean it each week. I thought - perhaps it’s because that same tool is configured to keep 3 latest versions of packages? But that was the default amount, so I didn’t change it.
I decided to run paccache -r and paccache -ruk0 in order to try to clean the cache. It only reduced to 7.5GB. I asked the EOS people about this… one of them recommended me to reduce the amount of stored versions of packages to 1. That… did nothing. It just refuses to reduce the cache any further.

anyone know what’s this about? :thinking:

perhaps I should be cleaning yay’s cache instead? I usually always use yay to update my system. I don’t know, I’m not experienced in this…

How old is your system? If you have a lot of packages, even one version might take a lot of space. The best thing to do is look in the directory and see what is there

I installed my system in 10.23 or 11.23, so it’s about half a year old.
I have 1332 pacman packages and 30 flatpaks.
there’s a ton of archives and .sig files in the directory, so… I’m not sure what exactly to look for.

err… nevermind all of this.
weirdly enough, I just checked the disc analyzer app again, and it says my cache is 3GB.
I remember checking it RIGHT AFTER I ran the cache cleaning command. And, when I did that (which was a few days go), it was 7.5GB. :face_with_raised_eyebrow:
oh well. I’m sorry for the false alarm I guess.
I mean, 3GB pacman cache is not abnormal, right?

1 Like

Mine it is 60GB so it seems small to me :rofl:


I mean…
it was an experienced arch user and an EOS forum regular (namely fbodymechanic), who told me that 8GB seems like too much for a pacman cache.
so… perhaps you’ve got some cache issues too? :smiling_face_with_tear:
unless you just never clear it?

forgot to mention - he said this even after learning that I keep 3 latest versions of packages.

My pacman cache was about 5GB, now it’s about 1GB. If everything works fine, I clear the whole directory from time to time. It’s not recommended, but a little adventure (without wet feet) on boring days. Fighting against aliens, baers, crocodiles, spiders, x-(wo)men… makes so much mess. I have to tidy everything up again afterwards. So I do my little big adventure on keyboard. Like Twinsen in the good old days. :wink:

You must have misunderstood something, because that’s not right.

Mine is about 20 GiB, and I just cleaned it for the purposes of this post.

The size of the cache varies a lot between individual users since we all have different packages installed. 8GB doesn’t sound out of line at all for 3 versions.

I don’t clear it very often, deliberately. :slight_smile:

Exactly. There is no point in cleaning it, unless you specifically need that space. There no harm in keeping it, it won’t slow down your system.

1 Like

It only reduced a small portion because you passed the -u flag to paccache.

Read man paccache

If you use -u, paccache will only remove the cache for packages that are no longer installed on the system.

If you truly want to remove all cached versions of all packages, you need to run:

$ paccache -rk0

That being said, unless you are severely short on disk space, don’t bother doing this. Keeping local copies of packages can make your life a lot easier if you ever end up in a FUBAR situation (e.g: you need to downgrade something and your system is so broken that you can’t even connect to the network).

why is it not recommended? o:
I thought the opposite, that it was recommended… that it would make the system less likely to have bugs or errors.
now I’m just not sure which system maintenance steps are recommended or not…

:man_shrugging: pretty sure I recall it correctly.

oh I see, I thought lots of cache makes the system slower and bugs more likely to happen

oh okay, thanks

as a certified newbie, I would probably just be reinstalling the system in that case lol

If you are worried about disk space and often forget to clear the pacman cache, you can enable paccache.timer to automatically remove old versions, keeping three versions per package every week.

No, clearing your cache only helps clear disk space. It has no impact on bugs or system performance.

I keep my cache on the large size because having those packages can help if you get into trouble and I have plenty of free disk space.


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