Update core/tabs/system-setup/system-cleanup.sh

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
This commit is contained in:
Infinite State 2024-10-27 15:38:33 -07:00 committed by GitHub
parent 7c055a32ea
commit 61246c9a2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,11 +23,7 @@ cleanup_system() {
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm
if pacman -Qtdq > /dev/null 2>&1; then
printf "%b\n" "${YELLOW}Detected Unused Packages. Removing.${RC}"
"$ESCALATION_TOOL" "$PACKAGER" -Rns $(pacman -Qtdq) --noconfirm > /dev/null 2>&1
fi
printf "%b\n" "${RED}No unused packages found. Skipping.${RC}"
"$ESCALATION_TOOL" "$PACKAGER" -Rns $(pacman -Qtdq) --noconfirm > /dev/null || true
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}. Skipping.${RC}"