mirror of https://github.com/captn3m0/Scripts.git
Improve AUR cache deletions
This commit is contained in:
parent
8a0c6c50a6
commit
bb0fb2a185
15
housekeeping
15
housekeeping
|
@ -7,23 +7,20 @@ find $WORK_ROOT -maxdepth 2 -type d -iname .git | xargs -I{} bash -c "cd {}/..
|
|||
|
||||
PERSONAL_ROOT="/home/nemo/projects/personal"
|
||||
find $PERSONAL_ROOT -maxdepth 2 -type d -iname .git | xargs -I{} bash -c "cd {}/.. && karn update"
|
||||
echo "karn update"
|
||||
|
||||
# Cleanup yay-cache
|
||||
find /home/nemo/.cache/yay -iregex '.*\.\(bz2\|tar\|zip\|deb\|xz\|part\|rpm\|gz\)$' -delete
|
||||
echo "Cleared yay cache"
|
||||
|
||||
cd /home/nemo/projects/personal/signal-desktop-beta-bin
|
||||
find /home/nemo/projects/personal/aur-* -iregex '.*\.\(bz2\|tar\|zip\|deb\|tar.zst\|xz\|part\|rpm\|gz\)$' -delete
|
||||
echo "Cleared personal AUR cache"
|
||||
|
||||
rm *.deb *.tar
|
||||
|
||||
cd ../koreader-appimage
|
||||
|
||||
rm *.AppImage *.tar
|
||||
|
||||
# Remove orphan packages
|
||||
sudo pacman -Rns $(pacman -Qtdq)
|
||||
echo "Removing orphan packages"
|
||||
|
||||
# Delete pacman cache files older than 7 days
|
||||
sudo find /var/cache/pacman/pkg -maxdepth 1 -mindepth 1 -mtime +7 -delete
|
||||
echo "Clearing pacman cache"
|
||||
|
||||
# Clear systemd logs
|
||||
sudo journalctl --vacuum-size=100M
|
||||
|
|
Loading…
Reference in New Issue