Add pacman cache cleanup utilities

This commit is contained in:
ItsDrike 2021-04-01 19:27:56 +02:00
parent adc2266932
commit 1c8c3379b6
No known key found for this signature in database
GPG key ID: 252D306F545351FC
4 changed files with 29 additions and 3 deletions

View file

@ -0,0 +1,13 @@
# Clean pacman cache of old and uninstalled packages every month
# This needs to be started by systemctl stat paccache.timer
# Usage requires pacman-contrib package to be installed
[Unit]
Description=Clean-up old pacman pkg
[Timer]
OnCalendar=monthly
Persistent=true
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,15 @@
# Pacman hook to automatically run paccache -r with pacman
# This hook is disabled by default, it can be enabled by
# renaming this file from paccache.hook.bak to paccache.hook
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache with paccache ...
When = PostTransaction
Exec = /usr/bin/paccache -r