Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ mo --version # Show installed version

- Safety first, if your Mac is mission-critical, wait for Mole to mature before full cleanups.
- Preview the cleanup by running `mo clean --dry-run` and reviewing the generated list.
- Protect caches with `mo clean --whitelist`; defaults cover Playwright, HuggingFace, and Maven paths.
- Protect caches with `mo clean --whitelist`; defaults cover Playwright, HuggingFace, Maven, and Surge Mac paths.
- Use `mo touchid` to approve sudo with Touch ID instead of typing your password.

## Quick Launchers
Expand Down
2 changes: 2 additions & 0 deletions bin/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ declare -a DEFAULT_WHITELIST_PATTERNS=(
"$HOME/.cache/huggingface*"
"$HOME/.m2/repository/*"
"$HOME/.ollama/models/*"
"$HOME/Library/Caches/com.nssurge.surge-mac/*"
"$HOME/Library/Application Support/com.nssurge.surge-mac/*"
)
declare -a WHITELIST_PATTERNS=()
WHITELIST_WARNINGS=()
Expand Down
6 changes: 5 additions & 1 deletion lib/whitelist_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ declare -a DEFAULT_WHITELIST_PATTERNS=(
"$HOME/.cache/huggingface*"
"$HOME/.m2/repository/*"
"$HOME/.ollama/models/*"
"$HOME/Library/Caches/com.nssurge.surge-mac/*"
"$HOME/Library/Application Support/com.nssurge.surge-mac/*"
)

# Save whitelist patterns to config
Expand All @@ -28,7 +30,7 @@ save_whitelist_patterns() {

cat > "$WHITELIST_CONFIG" << 'EOF'
# Mole Whitelist - Protected paths won't be deleted
# Default protections: Playwright browsers, HuggingFace models, Maven repo, Ollama models
# Default protections: Playwright browsers, HuggingFace models, Maven repo, Ollama models, Surge Mac
# Add one pattern per line to keep items safe.
EOF

Expand Down Expand Up @@ -118,6 +120,8 @@ Safari web browser cache|$HOME/Library/Caches/com.apple.Safari/*|browser_cache
Chrome browser cache|$HOME/Library/Caches/Google/Chrome/*|browser_cache
Firefox browser cache|$HOME/Library/Caches/Firefox/*|browser_cache
Brave browser cache|$HOME/Library/Caches/BraveSoftware/Brave-Browser/*|browser_cache
Surge proxy cache|$HOME/Library/Caches/com.nssurge.surge-mac/*|network_tools
Surge configuration and data|$HOME/Library/Application Support/com.nssurge.surge-mac/*|network_tools
Docker Desktop image cache|$HOME/Library/Containers/com.docker.docker/Data/*|container_cache
Podman container cache|$HOME/.local/share/containers/cache/*|container_cache
Font cache|$HOME/Library/Caches/com.apple.FontRegistry/*|system_cache
Expand Down