mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-10 02:39:40 +00:00
Add pacman cache cleanup utilities
This commit is contained in:
parent
adc2266932
commit
1c8c3379b6
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -22,9 +22,6 @@ env/
|
||||||
# Ignore ds store files
|
# Ignore ds store files
|
||||||
.DS_STORE
|
.DS_STORE
|
||||||
|
|
||||||
# Backup files
|
|
||||||
*.bak
|
|
||||||
|
|
||||||
# Personal TODO files
|
# Personal TODO files
|
||||||
TODO
|
TODO
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ pacman:
|
||||||
- net-tools
|
- net-tools
|
||||||
|
|
||||||
# CLI
|
# CLI
|
||||||
|
- pacman-contrib # Contains many useful scripts for pacman, such as paccache
|
||||||
- exa # Modern ls replacement
|
- exa # Modern ls replacement
|
||||||
- ncdu # Show folder sizes in a neat CLI graphical way
|
- ncdu # Show folder sizes in a neat CLI graphical way
|
||||||
- cron # Scheduling program
|
- cron # Scheduling program
|
||||||
|
|
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…
Reference in a new issue