mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-29 04:00:42 +00:00
Add pacman cache cleanup utilities
This commit is contained in:
parent
adc2266932
commit
1c8c3379b6
4 changed files with 29 additions and 3 deletions
13
root/etc/systemd/system/paccache.timer
Normal file
13
root/etc/systemd/system/paccache.timer
Normal 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
|
15
root/usr/share/libalpm/hooks/paccache.hook.bak
Normal file
15
root/usr/share/libalpm/hooks/paccache.hook.bak
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue