Pamac cache problem


  • Pamac 10.1.3-3


  • Option: Preferences/General/Cache/Number of versions of each package to keep

  • Set it to 0


After installing packages, the corresponding.zst files are in /var/cache/pacman/pkg/.


While doesn’t it work by the settings?

I guess it means:

  • 0 → only current version
  • 1 → current version plus keep previous version

Pamac needs the current packages for installation :wink:

I think the installed installers are not useful in most cases,
so there should an option for this.

BTW, I’d like to save the SSD, so I’m going to use tmpfs for the cache,
if it can’t be cleared automatically, it’ll be a big waste of memory.

1 Like

They actually serve a very specific purpose. An option to re-install without downloading.

However, you can run sudo pacman -Scc to completely empty out the package cache.

For rare cases, download and reinstall is acceptable.

rm also works, just need for an automatic way.

1 Like

There is no automatic way and I don’t feel there is a need for one.
The idea behind a cache, is to have something locally so you don’t need to redownload it if you need it again.

Do you also want your web browsers to not cache anything? Their cache is likely larger than the package cache when it’s only caching installed packages.

The browser cache is important for browsing. It speeds everything up but a installed package cache is something different. When accessing this forum, I want all images cached so they are shown immediately and the cache is accessed constantly.
The pamac/pacman caches are not accessed that much. How often do you reinstall the same packages over and over again? This is not a “normal” use case.

@followait You could write a pacman-hook that is run in the end that calls pacman -Scc to remove the lines.

1 Like

To me it’s not about doing it often. It’s about having the option, if you one day boot into the system and your internet does not work. Then you have the option to re-install the driver/kernel or rollback to a working one. I’m just saying. The package cache is handy to have. And disk space is still pretty cheap.

Yes, I understand that, it saved me a lot of time when I tried out pacman v6 when it wasn’t yet supported in Manjaro :wink:

My /var/cache/pacman/pkg folder is around 5 GB. If you mount that as tmpfs, your memory (not the cheap disk space) will be decreased a lot. I think the pacman-hook is the best way to go.
Or could maybe trick this setting at put -1 as number of kept packages :grinning_face_with_smiling_eyes:

ok only for very old ssd - with recent we can write more 30Go by day for 10 years - update is 1go (in cache) by week :wink:

or problem is space ?
with pamac we have pamac-cleancache.timer. run systemctl cat pamac-cleancache.{timer,service} for info (first week, each mouth cache is clear) - we can edit it

Anyway an option not to keep any cache for pacman is just another option that might be suitable for some cases, why not add it?

You can always ask for feature at the proper place I guess Files · master · Applications / pamac · GitLab


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