This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "** Starting cleaning pacman/AUR cache..." | |
# pacman cache directory | |
pcachedir="$(awk '/Cache/ {print $3}' /etc/pacman.conf)" | |
# paru/AUR cache directory | |
acachedir="$HOME/.cache/paru/clone" | |
toremove="$(comm -23 <(basename -a $(find $acachedir -mindepth 1 -maxdepth 1 -type d) | sort) <(pacman -Qqm) | xargs -r printf "$acachedir/%s\n")" |