diff --git a/lib/clean/system.sh b/lib/clean/system.sh index 52ac601..143cd3b 100644 --- a/lib/clean/system.sh +++ b/lib/clean/system.sh @@ -9,9 +9,11 @@ clean_deep_system() { stop_section_spinner # Clean old system caches - safe_sudo_find_delete "/Library/Caches" "*.cache" "$MOLE_TEMP_FILE_AGE_DAYS" "f" || true - safe_sudo_find_delete "/Library/Caches" "*.tmp" "$MOLE_TEMP_FILE_AGE_DAYS" "f" || true - safe_sudo_find_delete "/Library/Caches" "*.log" "$MOLE_LOG_AGE_DAYS" "f" || true + local cache_cleaned=0 + safe_sudo_find_delete "/Library/Caches" "*.cache" "$MOLE_TEMP_FILE_AGE_DAYS" "f" && cache_cleaned=1 || true + safe_sudo_find_delete "/Library/Caches" "*.tmp" "$MOLE_TEMP_FILE_AGE_DAYS" "f" && cache_cleaned=1 || true + safe_sudo_find_delete "/Library/Caches" "*.log" "$MOLE_LOG_AGE_DAYS" "f" && cache_cleaned=1 || true + [[ $cache_cleaned -eq 1 ]] && log_success "System caches" # Clean temporary files (macOS /tmp is a symlink to /private/tmp) local tmp_cleaned=0