Analyze and safely clean disk space on macOS. Use when the user asks about Mac storage, "System Data" taking too much space, disk cleanup, freeing up space, or managing storage on macOS. Covers caches, iOS simulators, Xcode data, trash, logs, and browser caches. Safe for everyday Mac users.
Safely analyze and reclaim disk space on macOS. Designed for everyday Mac users — no technical knowledge required.
| Category | Safe to Clean | Notes |
|---|---|---|
| User Caches | ✅ Yes | App temporary files |
| iOS Simulators | ✅ Yes | Unused simulator devices |
| Xcode Derived Data | ✅ Yes | Build artifacts (rebuildable) |
| Browser Caches | ✅ Yes | Chrome, Safari, Firefox |
| System Logs | ✅ Old only | 7+ days old, requires sudo |
| Trash | ✅ Yes |
| Empty trash |
| iOS Backups | ⚠️ Review | Check if backups are needed |
| Parallels VMs | ⚠️ Review | Only if Windows not needed |
| Time Machine Snapshots | ⚠️ Review | Can delete old snapshots |
/System folder contents/Library/Extensions or kernel extensions/private/var/db (system databases)bash scripts/mac-cleanup.sh analyze
Shows disk usage and identifies large items without making changes.
bash scripts/mac-cleanup.sh clean
Performs safe cleanup after user confirmation.
User Caches (~/Library/Caches/*)
Xcode Derived Data (~/Library/Developer/Xcode/DerivedData/*)
iOS Simulators (unavailable devices only)
Browser Caches
Old System Logs (7+ days)
Trash
.Trash folderIf the script identifies large items you want to handle manually:
# List backups
ls -lah ~/Library/Application\ Support/MobileSync/Backup/
# Delete specific backup (use folder name from above)
rm -rf ~/Library/Application\ Support/MobileSync/Backup/[FOLDER_NAME]
Or use Finder → Locations → [Your iPhone] → Manage Backups
# List snapshots
tmutil listlocalsnapshots /
# Delete all local snapshots
sudo tmutil deletelocalsnapshots /
# Or delete specific date
sudo tmutil deletelocalsnapshots 2024-01-15-123456
Open Parallels Desktop:
Clear from within the app:
| Path | What it is | Safe to delete? |
|---|---|---|
~/Downloads | Downloaded files | Review first |
~/Movies | Videos | Review first |
~/Parallels | Windows VMs | Only if not using |
~/Library/Containers/com.tencent.xinWeChat | WeChat data | Clear from WeChat app |
~/Library/Application Support | App data | Review per app |
Typical cleanup results for an everyday Mac user:
Grant Terminal Full Disk Access:
Run the analyze mode again:
bash scripts/mac-cleanup.sh analyze
Look for:
These require manual review before deletion.