Package cleanup not working

I have set the package cleanup configuration to daily and it’s not working. I even checked “Remove uninstalled but still cached packages now” and it still doesn’t work. The package cache usage is currently 1.6 GB.

Edit: When I run paccache -r it says “no candidate packages found for pruning”. So I guess there’s nothing to delete?

So, what is truth, and what is make-belief from your DE?

…seems make-belief… who or what is telling you, it’s 1.6GB?
…and did you reboot after deleting, and before checking again?

1 Like

The package cleanup configuration is telling me. And yes, I rebooted after deleting and checking again.

The 1.6 GB might be because it keeps 3 package versions by default.

If I used pacman -Sc it would probably delete it all.

Yes, this command will, by default, retain the last three versions of the packages in the pacman cache.

This will remove packages that are no longer installed from the cache as well as currently unused sync databases.

For more info:
:eye: https://wiki.archlinux.org/title/Paccache#Cleaning_the_package_cache

Also: man paccache and man pacman

2 Likes

Delete uninstalled packages that are still cached:

sudo paccache -ruk0

Delete package cache but leave the latest package of each into the cache:

sudo paccache -rk1

Delete the whole package cache:

sudo rm -f /var/cache/pacman/pkg/*

A better way to do the same thing (smaller chance of screwing up):

sudo pacman -Scc
3 Likes