Cleanup the package cache after install or upgrade

This commit is contained in:
Pierre Schmitz 2017-04-08 23:55:35 +02:00
parent f5bf444d43
commit 601fcd2526
2 changed files with 11 additions and 1 deletions

View file

@ -1,5 +1,4 @@
[options] [options]
CacheDir = /tmp/pacman/pkg
Architecture = auto Architecture = auto
SigLevel = Required DatabaseOptional SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional LocalFileSigLevel = Optional

View file

@ -0,0 +1,11 @@
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = *
[Action]
Description = Cleaning up package cache...
Depends = coreutils
When = PostTransaction
Exec = /usr/bin/rm -rf /var/cache/pacman/pkg /var/lib/pacman/sync