From 601fcd25268889138b7228ce932416d59d11c7eb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 8 Apr 2017 23:55:35 +0200 Subject: [PATCH] Cleanup the package cache after install or upgrade --- rootfs/etc/pacman.conf | 1 - rootfs/usr/share/libalpm/hooks/package-cleanup.hook | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 rootfs/usr/share/libalpm/hooks/package-cleanup.hook diff --git a/rootfs/etc/pacman.conf b/rootfs/etc/pacman.conf index 4a79cbd..9b7b455 100644 --- a/rootfs/etc/pacman.conf +++ b/rootfs/etc/pacman.conf @@ -1,5 +1,4 @@ [options] -CacheDir = /tmp/pacman/pkg Architecture = auto SigLevel = Required DatabaseOptional LocalFileSigLevel = Optional diff --git a/rootfs/usr/share/libalpm/hooks/package-cleanup.hook b/rootfs/usr/share/libalpm/hooks/package-cleanup.hook new file mode 100644 index 0000000..e8e28a7 --- /dev/null +++ b/rootfs/usr/share/libalpm/hooks/package-cleanup.hook @@ -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