From 253586baf9ce1ed1f72aa7ebdc263e88c80f181a Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Sat, 24 Aug 2024 00:49:05 -0400 Subject: [PATCH] [O] Better clean-cache --- scripts/includes/archlinux.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/includes/archlinux.sh b/scripts/includes/archlinux.sh index 38f0776..863ca48 100644 --- a/scripts/includes/archlinux.sh +++ b/scripts/includes/archlinux.sh @@ -49,11 +49,13 @@ if [ -f "/etc/arch-release" ]; then # Free up cache clean-cache() { - yay -Sc --noconfirm - sudo pacman -Sc --noconfirm - yarn cache clean - conda clean -a - pip cache remove '*' + has yay && yay -Sc --noconfirm + has pacman && sudo pacman -Sc --noconfirm + has pacman && rm -rf /var/cache/pacman + has paru && rm -rf "$HOME/.cache/paru" + has yarn && yarn cache clean + has conda && conda clean -a + has pip && pip cache remove '*' } # Command-not-found install prompt