From d4600f66231259741221a7006f2dee40c9c7b7f9 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 6 Dec 2025 12:53:16 +0800 Subject: [PATCH] More perfect cleaning --- lib/clean/dev.sh | 1 + lib/clean/user.sh | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/clean/dev.sh b/lib/clean/dev.sh index f3f1321..40a7cc1 100644 --- a/lib/clean/dev.sh +++ b/lib/clean/dev.sh @@ -142,6 +142,7 @@ clean_dev_mobile() { # Removes old and unused local iOS simulator data from old unused runtimes # Can free up significant space (70GB+ in some cases) if command -v xcrun > /dev/null 2>&1; then + debug_log "Checking for unavailable Xcode simulators" clean_tool_cache "Xcode unavailable simulators" xcrun simctl delete unavailable note_activity fi diff --git a/lib/clean/user.sh b/lib/clean/user.sh index 1e7f61b..c32e051 100644 --- a/lib/clean/user.sh +++ b/lib/clean/user.sh @@ -201,8 +201,26 @@ clean_application_support_logs() { # These are covered by browser-specific cleaning in clean_browsers() done - # DISABLED: Group Containers log scanning (find operation can hang) - # Group container logs are usually minimal, skipping for performance + # Clean Group Containers logs - only scan known containers to avoid hanging + # Direct path access is fast and won't cause performance issues + # Add new containers here as users report them + local known_group_containers=( + "group.com.apple.contentdelivery" # Issue #104: Can accumulate 4GB+ in Library/Logs/Transporter + ) + + for container in "${known_group_containers[@]}"; do + local container_path="$HOME/Library/Group Containers/$container" + + # Check both direct Logs and Library/Logs patterns + if [[ -d "$container_path/Logs" ]]; then + debug_log "Scanning Group Container: $container/Logs" + safe_clean "$container_path/Logs"/* "Group container logs: $container" + fi + if [[ -d "$container_path/Library/Logs" ]]; then + debug_log "Scanning Group Container: $container/Library/Logs" + safe_clean "$container_path/Library/Logs"/* "Group container logs: $container" + fi + done } # Check and show iOS device backup info