diff --git a/CONTRIBUTORS.svg b/CONTRIBUTORS.svg index 4ec32da7..225e4450 100644 --- a/CONTRIBUTORS.svg +++ b/CONTRIBUTORS.svg @@ -1,5 +1,5 @@ - - + + @@ -58,24 +58,24 @@ - + - - - iamxorum + + + dwjoss - + - - - dwjoss + + + iamxorum @@ -135,211 +135,211 @@ - + - - - Angelk90 + + + yhy0 - + - - - OWConnoi + + + yetval - + - - - guobosheng + + + Sizk - + - - - Sizk + + + guobosheng - + - - - yetval + + + OWConnoi - + - - - biplavbarua + + + Angelk90 - + - - - bevanjkay + + + carolyn-sun - + - - - rubnogueira + + + Else00 - + - - - bsisduck + + + fte-jjmartres - + - - - carolyn-sun + + + jimmystridh - + - - - Else00 + + + spider-yamet - + - - - fte-jjmartres + + + MohammedTarigg - + - - - jimmystridh + + + bsisduck - + - - - spider-yamet + + + biplavbarua - + - - - MohammedTarigg + + + bevanjkay - + - - - abcreativ + + + rubnogueira - + - - - IMZihad21 + + + shakeelmohamed - + - - - unnipv + + + Harsh-Kapoorr - + - - - TyceHerrman + + + thijsvanhal @@ -355,38 +355,49 @@ - + - - - thijsvanhal + + + TyceHerrman - + - - - Harsh-Kapoorr + + + unnipv - + - - - shakeelmohamed + + + IMZihad21 + + + + + + + + abcreativ + + + @@ -397,7 +408,7 @@ pranahonk - + @@ -408,7 +419,7 @@ philippb - + @@ -419,7 +430,7 @@ ppauel - + @@ -430,7 +441,7 @@ onurtashan - + @@ -441,7 +452,7 @@ ndbroadbent - + @@ -452,7 +463,7 @@ M-Hassan-Raza - + @@ -463,7 +474,7 @@ MohammedEsafi - + @@ -474,7 +485,7 @@ bikraj2 - + @@ -485,7 +496,7 @@ bunizao - + @@ -496,7 +507,7 @@ guangjun-super - + @@ -507,7 +518,7 @@ connorscott1 - + @@ -518,7 +529,7 @@ corevibe555 - + @@ -529,7 +540,7 @@ rans0 - + @@ -540,7 +551,7 @@ fishwww-ww - + @@ -551,7 +562,7 @@ frozturk - + @@ -562,7 +573,7 @@ huyixi - + @@ -573,7 +584,7 @@ purofle - + @@ -584,7 +595,7 @@ sibisai - + @@ -595,7 +606,7 @@ yamamel - + @@ -606,7 +617,7 @@ Parsifa1 - + @@ -617,7 +628,7 @@ NanmiCoder - + @@ -628,7 +639,7 @@ KoukeNeko - + @@ -639,7 +650,7 @@ rafay99-epic - + @@ -650,7 +661,7 @@ AlexanderAverin - + @@ -661,7 +672,7 @@ AmanSikarwar - + @@ -672,7 +683,7 @@ andmev - + @@ -683,7 +694,7 @@ MASNathan - + @@ -694,18 +705,18 @@ aronprins - + - + uluumbch - + @@ -716,7 +727,7 @@ bashu - + @@ -727,7 +738,7 @@ byronwang2005 - + @@ -738,7 +749,7 @@ ClathW - + @@ -749,7 +760,7 @@ Copper-Eye - + @@ -760,7 +771,7 @@ DimitarNestorov - + @@ -771,7 +782,7 @@ FelixLyfe - + @@ -782,7 +793,7 @@ gokulp01 - + @@ -793,7 +804,7 @@ HaraldNordgren - + @@ -804,7 +815,7 @@ Hensell - + @@ -815,7 +826,7 @@ jalen0x - + @@ -826,7 +837,7 @@ jason-costello - + @@ -837,7 +848,7 @@ khisby - + @@ -848,7 +859,7 @@ kowyo - + @@ -859,7 +870,7 @@ kwakubiney - + @@ -870,7 +881,7 @@ LmanTW - + @@ -881,7 +892,7 @@ injuxtice - + @@ -892,7 +903,7 @@ khipu-luke - + @@ -903,7 +914,7 @@ mariovtor - + @@ -914,7 +925,7 @@ degouville - + @@ -925,7 +936,7 @@ anonymort - + @@ -936,7 +947,7 @@ Schlauer-Hax - + @@ -947,7 +958,7 @@ mickyyy68 - + @@ -958,7 +969,7 @@ EastSun5566 - + diff --git a/lib/clean/app_caches.sh b/lib/clean/app_caches.sh index 67a2172a..d5d7879b 100644 --- a/lib/clean/app_caches.sh +++ b/lib/clean/app_caches.sh @@ -168,6 +168,22 @@ clean_code_editors() { safe_clean ~/Library/Caches/Zed/* "Zed cache" safe_clean ~/Library/Logs/Zed/* "Zed logs" clean_editor_obsolete_extensions + # CodeBuddy Extension (VS Code fork, Electron) + if [[ -d ~/Library/Application\ Support/CodeBuddyExtension ]]; then + safe_clean ~/Library/Application\ Support/CodeBuddyExtension/Cache/* "CodeBuddy Extension cache" + safe_clean ~/Library/Application\ Support/CodeBuddyExtension/logs/* "CodeBuddy Extension logs" + fi + # CodeBuddy CN (VS Code fork, Electron) + if [[ -d ~/Library/Application\ Support/CodeBuddy\ CN ]]; then + safe_clean ~/Library/Application\ Support/CodeBuddy\ CN/Cache/* "CodeBuddy CN cache" + safe_clean ~/Library/Application\ Support/CodeBuddy\ CN/CachedData/* "CodeBuddy CN cached data" + safe_clean ~/Library/Application\ Support/CodeBuddy\ CN/CachedExtensionVSIXs/* "CodeBuddy CN extension cache" + safe_clean ~/Library/Application\ Support/CodeBuddy\ CN/Code\ Cache/* "CodeBuddy CN code cache" + safe_clean ~/Library/Application\ Support/CodeBuddy\ CN/GPUCache/* "CodeBuddy CN GPU cache" + safe_clean ~/Library/Application\ Support/CodeBuddy\ CN/DawnGraphiteCache/* "CodeBuddy CN Dawn cache" + safe_clean ~/Library/Application\ Support/CodeBuddy\ CN/DawnWebGPUCache/* "CodeBuddy CN WebGPU cache" + safe_clean ~/Library/Application\ Support/CodeBuddy\ CN/logs/* "CodeBuddy CN logs" + fi } # Communication apps. clean_communication_apps() { @@ -358,6 +374,7 @@ clean_productivity_apps() { safe_clean ~/Library/Containers/com.ranchero.NetNewsWire-Evergreen/Data/Library/Caches/* "NetNewsWire cache" safe_clean ~/Library/Containers/com.ideasoncanvas.mindnode/Data/Library/Caches/* "MindNode cache" safe_clean ~/.cache/kaku/* "Kaku cache" + safe_clean ~/Library/Application\ Support/spacedrive/thumbnails/* "Spacedrive thumbnail cache" } # Music/media players (protect Spotify offline music). clean_media_players() { @@ -390,6 +407,16 @@ clean_media_players() { safe_clean ~/Library/Caches/tv.plex.player.desktop "Plex cache" safe_clean ~/Library/Caches/com.netease.163music "NetEase Music cache" safe_clean ~/Library/Caches/com.tencent.QQMusic/* "QQ Music cache" + safe_clean ~/Library/Caches/com.tencent.QQMusicMac/* "QQ Music Mac cache" + # QQ Music Mac sandboxed container caches (protect offline downloads in iDownloadProxy). + local _qqmusic_container="$HOME/Library/Containers/com.tencent.QQMusicMac/Data/Library/Application Support/QQMusicMac" + if [[ -d "$_qqmusic_container" ]]; then + safe_clean "$_qqmusic_container/iRRCache"/* "QQ Music streaming cache" + safe_clean "$_qqmusic_container/iLog"/* "QQ Music logs" + safe_clean "$_qqmusic_container/iCache"/* "QQ Music cache" + safe_clean "$_qqmusic_container/iTemp"/* "QQ Music temp files" + fi + safe_clean ~/Library/Containers/com.tencent.QQMusicMac/Data/Library/Caches/* "QQ Music container cache" safe_clean ~/Library/Caches/com.kugou.mac/* "Kugou Music cache" safe_clean ~/Library/Caches/com.kuwo.mac/* "Kuwo Music cache" } @@ -400,6 +427,13 @@ clean_video_players() { safe_clean ~/Library/Caches/io.mpv "MPV cache" safe_clean ~/Library/Caches/com.iqiyi.player "iQIYI cache" safe_clean ~/Library/Caches/com.tencent.tenvideo "Tencent Video cache" + # Tencent Video sandboxed container caches. + local _tenvideo_as="$HOME/Library/Containers/com.tencent.tenvideo/Data/Library/Application Support" + if [[ -d "$_tenvideo_as" ]]; then + safe_clean "$_tenvideo_as/Upgrade"/* "Tencent Video old installer" + safe_clean "$_tenvideo_as/VideoNative"/* "Tencent Video native cache" + safe_clean "$_tenvideo_as/documentCache"/* "Tencent Video document cache" + fi safe_clean ~/Library/Caches/tv.danmaku.bili/* "Bilibili cache" safe_clean ~/Library/Caches/com.douyu.*/* "Douyu cache" safe_clean ~/Library/Caches/com.huya.*/* "Huya cache" @@ -416,6 +450,69 @@ clean_download_managers() { safe_clean ~/Library/Caches/com.downie.Downie-* "Downie cache" safe_clean ~/Library/Caches/com.folx.*/* "Folx cache" safe_clean ~/Library/Caches/com.charlessoft.pacifist/* "Pacifist cache" + clean_neatdm_stale_segments +} +# Neat Download Manager: clean stale incomplete download segments. +# History database (NeatDB.db) is never touched; only numbered segment +# directories whose seg.x0 file is older than MOLE_ORPHAN_AGE_DAYS are removed. +# Download URLs expire within hours/days so 30-day-old segments cannot be resumed. +clean_neatdm_stale_segments() { + local neatdm_dir="$HOME/Library/Application Support/com.NeatDownloadManager" + [[ -d "$neatdm_dir" ]] || return 0 + + local stale_count=0 + local stale_kb=0 + local current_epoch + current_epoch=$(get_epoch_seconds) + + local -a stale_dirs=() + local seg_dir + for seg_dir in "$neatdm_dir"/*/; do + [[ -d "$seg_dir" ]] || continue + [[ -f "$seg_dir/seg.x0" ]] || continue + + local seg_mtime + seg_mtime=$(get_file_mtime "$seg_dir/seg.x0") + local age_days=$(((current_epoch - seg_mtime) / 86400)) + + if [[ $age_days -ge ${MOLE_ORPHAN_AGE_DAYS:-30} ]]; then + stale_dirs+=("$seg_dir") + fi + done + + [[ ${#stale_dirs[@]} -eq 0 ]] && return 0 + + for seg_dir in "${stale_dirs[@]}"; do + local size_kb + size_kb=$(get_path_size_kb "$seg_dir") + [[ "$size_kb" =~ ^[0-9]+$ ]] || size_kb=0 + + if [[ "$DRY_RUN" != "true" ]]; then + if safe_remove "$seg_dir" true; then + stale_count=$((stale_count + 1)) + stale_kb=$((stale_kb + size_kb)) + fi + else + stale_count=$((stale_count + 1)) + stale_kb=$((stale_kb + size_kb)) + fi + done + + if [[ $stale_count -gt 0 ]]; then + local size_human + size_human=$(bytes_to_human "$((stale_kb * 1024))") + if [[ "$DRY_RUN" == "true" ]]; then + echo -e " ${YELLOW}${ICON_DRY_RUN}${NC} NeatDM stale downloads · ${stale_count} items, $(colorize_human_size "$size_human") ${YELLOW}dry${NC}" + else + local line_color + line_color=$(cleanup_result_color_kb "$stale_kb") + echo -e " ${line_color}${ICON_SUCCESS}${NC} NeatDM stale downloads · ${stale_count} items, ${line_color}${size_human}${NC}" + fi + files_cleaned=$((files_cleaned + stale_count)) + total_size_cleaned=$((total_size_cleaned + stale_kb)) + total_items=$((total_items + 1)) + note_activity + fi } # Gaming platforms. clean_gaming_platforms() { diff --git a/lib/clean/dev.sh b/lib/clean/dev.sh index 589f51c1..2799577e 100644 --- a/lib/clean/dev.sh +++ b/lib/clean/dev.sh @@ -275,6 +275,8 @@ clean_dev_python() { safe_clean ~/.cache/tensorflow/* "TensorFlow cache" clean_conda_metadata_caches safe_clean ~/.cache/wandb/* "Weights & Biases cache" + safe_clean ~/Library/Application\ Support/virtualenv/wheel/* "virtualenv seed wheel cache" + safe_clean ~/Library/Application\ Support/virtualenv/unzip/* "virtualenv seed unzip cache" } # Go build/module caches. clean_dev_go() { @@ -409,6 +411,13 @@ clean_dev_docker() { debug_log "Docker daemon-managed cleanup skipped by default" fi safe_clean ~/.docker/buildx/cache/* "Docker BuildX cache" + if command -v podman > /dev/null 2>&1; then + note_activity + echo -e " ${GRAY}${ICON_WARNING}${NC} Podman unused data · skipped by default" + echo -e " ${GRAY}${ICON_REVIEW}${NC} ${GRAY}Review: podman system df${NC}" + echo -e " ${GRAY}${ICON_REVIEW}${NC} ${GRAY}Prune: podman system prune --filter until=720h${NC}" + debug_log "Podman daemon-managed cleanup skipped by default" + fi } # Nix garbage collection. clean_dev_nix() { @@ -1251,6 +1260,69 @@ clean_dev_ai_agents() { done } +# GitKraken CLI old versions (keep active symlink target + most recent). +clean_dev_gitkraken_cli() { + local versions_root="$HOME/Library/Application Support/GitKrakenCLI/versions" + [[ -d "$versions_root" ]] || return 0 + + local active_symlink="$HOME/Library/Application Support/GitKrakenCLI/gk" + local keep_previous="${MOLE_AI_AGENTS_KEEP:-1}" + [[ "$keep_previous" =~ ^[0-9]+$ ]] || keep_previous=1 + + local active_path="" + if [[ -L "$active_symlink" ]]; then + local target + target=$(readlink "$active_symlink" 2> /dev/null || true) + if [[ -n "$target" ]]; then + local entry + for entry in "$versions_root"/*; do + [[ -e "$entry" ]] || continue + case "$target/" in + "$entry"/*) + active_path="$entry" + break + ;; + esac + done + fi + fi + + local -a entries=() + while IFS= read -r -d '' entry; do + local name + name=$(basename "$entry") + [[ "$name" == .* ]] && continue + entries+=("$entry") + done < <(command find "$versions_root" -mindepth 1 -maxdepth 1 -type d -print0 2> /dev/null) + + [[ ${#entries[@]} -le "$keep_previous" ]] && return 0 + + local -a sorted=() + while IFS= read -r line; do + sorted+=("${line#* }") + done < <( + for entry in "${entries[@]}"; do + local mtime + mtime=$(stat -f%m "$entry" 2> /dev/null || echo "0") + printf '%s %s\n' "$mtime" "$entry" + done | sort -rn + ) + + local idx=0 + for target in "${sorted[@]}"; do + if [[ -n "$active_path" && "$target" == "$active_path" ]]; then + continue + fi + if [[ $idx -lt $keep_previous ]]; then + idx=$((idx + 1)) + continue + fi + safe_clean "$target" "GitKraken CLI old version" + note_activity + idx=$((idx + 1)) + done +} + # Other language tool caches. clean_dev_other_langs() { safe_clean ~/.composer/cache/* "PHP Composer cache (legacy)" @@ -1451,11 +1523,47 @@ clean_dev_misc() { [[ -d "$HOME/.local/share/cursor-agent" ]] && safe_find_delete "$HOME/.local/share/cursor-agent" "*.log" "$MOLE_LOG_AGE_DAYS" "f" # Playwright cached browser binaries safe_clean ~/Library/Caches/ms-playwright/* "Playwright browsers" + # Playwright Go browser cache (Go variant of ms-playwright) + safe_clean ~/.cache/ms-playwright-go/* "Playwright Go browser cache" + # Chrome DevTools MCP browser profile cache (skip while MCP server is running) + if ! pgrep -f "chrome-devtools-mcp" > /dev/null 2>&1; then + safe_clean ~/.cache/chrome-devtools-mcp/chrome-profile/* "Chrome DevTools MCP cache" + fi + # Solana CLI platform-tools cache (rebuild on install) + safe_clean ~/.cache/solana/* "Solana CLI cache" + # PyInstaller bootloader binary cache (rebuild on next package) + safe_clean ~/Library/Application\ Support/pyinstaller/bincache*/* "PyInstaller bootloader cache" + # ChromaDB embedding model cache (large ML models, review only) + if [[ -d ~/.cache/chroma ]]; then + local chroma_kb + chroma_kb=$(get_path_size_kb ~/.cache/chroma 2> /dev/null || echo 0) + if [[ "$chroma_kb" -gt 102400 ]]; then + local chroma_human + chroma_human=$(bytes_to_human "$((chroma_kb * 1024))") + echo -e " ${YELLOW}${ICON_WARNING}${NC} ChromaDB model cache: ${GREEN}${chroma_human}${NC}${GRAY}, Path: ~/.cache/chroma${NC}" + note_activity + fi + fi + # OpenCode session storage (chat history, user decision) + if [[ -d ~/.local/share/opencode/storage ]]; then + local oc_storage_kb + oc_storage_kb=$(get_path_size_kb ~/.local/share/opencode/storage 2> /dev/null || echo 0) + if [[ "$oc_storage_kb" -gt 102400 ]]; then + local oc_human + oc_human=$(bytes_to_human "$((oc_storage_kb * 1024))") + echo -e " ${YELLOW}${ICON_WARNING}${NC} OpenCode session data: ${GREEN}${oc_human}${NC}${GRAY}, Path: ~/.local/share/opencode/storage${NC}" + note_activity + fi + fi # Claude Code state under ~/.claude can include persistent memory, # plugin registry data, hooks, and session context. Do not clean it # automatically; users can remove specific paths manually if needed. # Wondershare orphan installer payload (bundle ID differs from live app) safe_clean ~/Library/Application\ Support/com.wondershare.Installer/* "Wondershare installer payload" + # Chromium browser snapshot downloads (standalone Chromium binaries) + safe_clean ~/.chromium-browser-snapshots/* "Chromium browser snapshots" + # ScmClient (Tencent iOA) logs + safe_clean ~/Library/Logs/ScmClient/* "ScmClient logs" } # Shell and VCS leftovers. clean_dev_shell() { @@ -1548,6 +1656,7 @@ clean_developer_tools() { clean_dev_jetbrains_toolbox clean_dev_jetbrains_logs clean_dev_ai_agents + clean_dev_gitkraken_cli clean_dev_other_langs clean_dev_cicd clean_dev_database diff --git a/lib/clean/user.sh b/lib/clean/user.sh index 6566c32e..de2f76ba 100644 --- a/lib/clean/user.sh +++ b/lib/clean/user.sh @@ -929,6 +929,92 @@ clean_app_caches() { fi clean_group_container_caches + clean_webkit_app_caches +} + +# WebKit WebsiteData cleanup for non-Apple apps. +# ~/Library/WebKit//WebsiteData/ stores web content caches for apps +# using WKWebView. These are regenerated automatically on next use. +# The uninstall module already knows about this directory (app_protection.sh) +# but mo clean did not scan it. +clean_webkit_app_caches() { + local webkit_dir="$HOME/Library/WebKit" + [[ -d "$webkit_dir" ]] || return 0 + + start_section_spinner "Scanning WebKit app caches..." + + local total_size=0 + local cleaned_count=0 + local found_any=false + + local _ng_state + _ng_state=$(shopt -p nullglob || true) + shopt -s nullglob + + for app_dir in "$webkit_dir"/*/; do + [[ -d "$app_dir" ]] || continue + [[ -L "$app_dir" ]] && continue + + local bundle_id="${app_dir%/}" + bundle_id="${bundle_id##*/}" + + # Skip Apple system components + [[ "$bundle_id" == com.apple.* ]] && continue + + if is_critical_system_component "$bundle_id" 2> /dev/null; then + continue + fi + if should_protect_data "$bundle_id" 2> /dev/null; then + continue + fi + + local ws_dir="$app_dir/WebsiteData" + [[ -d "$ws_dir" ]] || continue + + if is_path_whitelisted "$ws_dir" 2> /dev/null; then + continue + fi + + local size_kb + size_kb=$(get_path_size_kb "$ws_dir" 2> /dev/null || echo 0) + [[ "$size_kb" =~ ^[0-9]+$ ]] || size_kb=0 + [[ "$size_kb" -gt 0 ]] || continue + + found_any=true + total_size=$((total_size + size_kb)) + cleaned_count=$((cleaned_count + 1)) + + if [[ "$DRY_RUN" != "true" ]]; then + local _dg_state + _dg_state=$(shopt -p dotglob || true) + shopt -s dotglob + local item + for item in "$ws_dir"/*; do + [[ -e "$item" ]] || continue + safe_remove "$item" true || true + done + eval "$_dg_state" + fi + done + + eval "$_ng_state" + stop_section_spinner + + if [[ "$found_any" == "true" ]]; then + local size_human + size_human=$(bytes_to_human "$((total_size * 1024))") + if [[ "$DRY_RUN" == "true" ]]; then + echo -e " ${YELLOW}${ICON_DRY_RUN}${NC} WebKit app caches${NC}, $(colorize_human_size "$size_human") ${YELLOW}dry${NC}" + else + local line_color + line_color=$(cleanup_result_color_kb "$total_size") + echo -e " ${line_color}${ICON_SUCCESS}${NC} WebKit app caches${NC}, ${line_color}$size_human${NC}" + fi + files_cleaned=$((files_cleaned + cleaned_count)) + total_size_cleaned=$((total_size_cleaned + total_size)) + total_items=$((total_items + 1)) + note_activity + fi } # Process a single container cache directory. @@ -1363,6 +1449,7 @@ clean_browsers() { local _arc_running=false pgrep -x "Arc" > /dev/null 2>&1 && _arc_running=true if [[ "$_arc_running" != "true" ]]; then + # Legacy layout: profiles directly under Arc/ safe_clean ~/Library/Application\ Support/Arc/*/Code\ Cache/* "Arc code cache" safe_clean ~/Library/Application\ Support/Arc/*/GPUCache/* "Arc GPU cache" safe_clean ~/Library/Application\ Support/Arc/*/DawnCache/* "Arc Dawn cache" @@ -1372,6 +1459,18 @@ clean_browsers() { safe_clean ~/Library/Application\ Support/Arc/GrShaderCache/* "Arc GR shader cache" safe_clean ~/Library/Application\ Support/Arc/GraphiteDawnCache/* "Arc Dawn cache" safe_clean ~/Library/Application\ Support/Arc/Crashpad/completed/* "Arc crash reports" + # New layout: profiles under Arc/User Data/ + safe_clean ~/Library/Application\ Support/Arc/User\ Data/*/Code\ Cache/* "Arc code cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/*/GPUCache/* "Arc GPU cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/*/DawnCache/* "Arc Dawn cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/*/GrShaderCache/* "Arc GR shader cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/*/GraphiteDawnCache/* "Arc Graphite Dawn cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/ShaderCache/* "Arc shader cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/GrShaderCache/* "Arc GR shader cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/GraphiteDawnCache/* "Arc Dawn cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/component_crx_cache/* "Arc component CRX cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/extensions_crx_cache/* "Arc extensions CRX cache" + safe_clean ~/Library/Application\ Support/Arc/User\ Data/Crashpad/completed/* "Arc crash reports" fi for _arc_profile in "$HOME/Library/Application Support/Arc"/*/; do clean_service_worker_cache "Arc" "$_arc_profile/Service Worker/CacheStorage" @@ -1379,6 +1478,14 @@ clean_browsers() { safe_clean "$_arc_profile"/Service\ Worker/ScriptCache/* "Arc Service Worker ScriptCache" fi done + # New layout: Service Worker under Arc/User Data/*/ + for _arc_profile in "$HOME/Library/Application Support/Arc/User Data"/*/; do + [[ -d "$_arc_profile" ]] || continue + clean_service_worker_cache "Arc" "$_arc_profile/Service Worker/CacheStorage" + if [[ "$_arc_running" != "true" ]]; then + safe_clean "$_arc_profile"/Service\ Worker/ScriptCache/* "Arc Service Worker ScriptCache" + fi + done fi safe_clean ~/Library/Caches/company.thebrowser.dia/* "Dia cache" if [[ -d ~/Library/Application\ Support/BraveSoftware ]]; then @@ -1471,6 +1578,21 @@ clean_browsers() { clean_edge_old_versions clean_edge_updater_old_versions clean_brave_old_versions + # QQ Browser 3 (Chromium-based). + if [[ -d ~/Library/Application\ Support/QQBrowser3 ]]; then + safe_clean ~/Library/Caches/com.tencent.QQBrowser3/* "QQ Browser cache" + local _qqbrowser_running=false + pgrep -x "QQBrowser3" > /dev/null 2>&1 && _qqbrowser_running=true + if [[ "$_qqbrowser_running" != "true" ]]; then + safe_clean ~/Library/Application\ Support/QQBrowser3/*/Code\ Cache/* "QQ Browser code cache" + safe_clean ~/Library/Application\ Support/QQBrowser3/*/GPUCache/* "QQ Browser GPU cache" + safe_clean ~/Library/Application\ Support/QQBrowser3/ShaderCache/* "QQ Browser shader cache" + safe_clean ~/Library/Application\ Support/QQBrowser3/GrShaderCache/* "QQ Browser GR shader cache" + safe_clean ~/Library/Application\ Support/QQBrowser3/GraphiteDawnCache/* "QQ Browser Dawn cache" + safe_clean ~/Library/Application\ Support/QQBrowser3/component_crx_cache/* "QQ Browser component cache" + safe_clean ~/Library/Application\ Support/QQBrowser3/Crashpad/completed/* "QQ Browser crash reports" + fi + fi } # Cloud storage caches. @@ -1524,6 +1646,7 @@ clean_office_applications() { safe_clean ~/Library/Caches/com.kingsoft.wpsoffice.mac "WPS Office cache" safe_clean ~/Library/Caches/org.mozilla.thunderbird/* "Thunderbird cache" safe_clean ~/Library/Caches/com.apple.mail/* "Apple Mail cache" + safe_clean ~/Library/Group\ Containers/UBF8T346G9.Office/FontCache/* "Microsoft Office font cache" } # Virtualization caches. @@ -2105,6 +2228,8 @@ check_large_file_candidates() { _report_large_review_dir "pnpm store (review only)" "$HOME/Library/pnpm/store" _report_large_review_dir "Conda packages (review only)" "$HOME/.conda/pkgs" _report_large_review_dir "Anaconda packages (review only)" "$HOME/anaconda3/pkgs" + _report_large_review_dir "OpenCode session data (review only)" "$HOME/.local/share/opencode/storage" + _report_large_review_dir "ChromaDB model cache (review only)" "$HOME/.cache/chroma" if [[ "$found_any" == "false" ]]; then echo -e " ${GREEN}${ICON_SUCCESS}${NC} No large items detected in common locations"