Clearing the Arch Package Cache

Just like on Debian, Arch will not clear its package cache:

$ du -hs /var/cache/pacman/pkg/
103G    /var/cache/pacman/pkg/

Just like you can clear it with apt-get clean on Debian, you can do:

# pacman -Scc

However, if you only pass it -Sc, it'll only remove the package versions you don't have installed:

[root@quanah ~]# 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]

Adding the second c makes it remove those archives too.

Happy cleaning!


~ /home 🏠 ~ talks 💬 ~ bash ~ craftsmanship ~ db ~ dongxi ~ emacs ~ escenic ~ iam ~ java ~ js ~ language ~ latex ~ ldap ~ life ~ linux ~ llm ~ mac-os-x ~ mt-foo ~ network ~ norsk ~ python ~ quotes ~ running ~ security ~ travel ~ unix ~ various ~ vcs ~ webdesign ~ windows ~ discoveries ~ cv 🧙 ~

Licensed under CC BY Creative Commons License ~ 📡 RSS feed ~ ✉ torstein.k.johansen @ gmail ~ 🐘 @skybert@hachyderm.io ~ 🎥 youtube.com/@skybert