Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pacman hooks to clean old package cache
# /etc/pacman.d/hooks/paccache_outdated.hook
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache (outdated versions)
When = PostTransaction
Exec = /usr/bin/paccache -rk3
Depends = pacman-contrib
# /etc/pacman.d/hooks/paccache_uninstalled.hook
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache (uninstalled packages)
When = PostTransaction
Exec = /usr/bin/paccache -ruk0
Depends = pacman-contrib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.