Cleaning pacman Cache

Published | Go Back

I just learned how to clean pac­man’s pack­age cache.

I came across this wiki page when I was strug­gling with disk space the other day. It was then that I learned that pac­man would keep all ver­sions of down­loaded pack­ages, no mat­ter whether the pack­age is in­stalled or not. Cleaning the cache is easy:

paccache -r

This will re­move all cached ver­sions ex­cept the most re­cent 3. There are more ag­gres­sive op­tions as well men­tioned in that wiki page, such as:

pacman -Sc

This will keep only the lat­est ver­sion for cur­rently in­stalled pack­ages. Older ver­sions and unin­stalled pack­ages will be re­moved. Of course, this is not rec­om­mended. However, as a fun fact, I used that com­mand to re­gain over 22GB disk space.