From 17944a0867a03c092fcd419477b0efe08926d3ab Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Mon, 10 Jun 2019 10:21:41 -0300 Subject: [PATCH] Including hooks to keep /var folder clean using paccache Included hooks to delete old cache files from pacman, to avoid /var folder to stay full --- Pacman/clean_package_cache.hook | 11 +++++++++++ Pacman/clean_uninstalled_packages.hooks | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 Pacman/clean_package_cache.hook create mode 100644 Pacman/clean_uninstalled_packages.hooks diff --git a/Pacman/clean_package_cache.hook b/Pacman/clean_package_cache.hook new file mode 100644 index 0000000..5d0394d --- /dev/null +++ b/Pacman/clean_package_cache.hook @@ -0,0 +1,11 @@ +# Copy this file into /etc/pacman.d/hooks folder +[Trigger] +Operation = Upgrade +Operation = Install +Operation = Remove +Type = Package +Target = * +[Action] +Description = Bruno: Cleaning pacman cache... +When = PostTransaction +Exec = /usr/bin/paccache -r diff --git a/Pacman/clean_uninstalled_packages.hooks b/Pacman/clean_uninstalled_packages.hooks new file mode 100644 index 0000000..e69c2a5 --- /dev/null +++ b/Pacman/clean_uninstalled_packages.hooks @@ -0,0 +1,9 @@ +# Copy this file into /etc/pacman.d/hooks folder +[Trigger] +Operation = Remove +Type = Package +Target = * +[Action] +Description = Bruno: Cleaning removed packages pacman cache... +When = PostTransaction +Exec = /usr/bin/paccache -ruk0