Restructured 92-mac-optimizer from a CLAUDE.md-based skill into a full Claude Code plugin with .claude-plugin/plugin.json, 6 slash commands (/mac-doctor, /mac-packages, /mac-environment, /mac-security, /mac-cleanup, /mac-resources), and auto-trigger SKILL.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
75 lines
2.9 KiB
Markdown
75 lines
2.9 KiB
Markdown
# Cleanup Targets Reference
|
|
|
|
## Risk Ratings
|
|
|
|
| Risk | Meaning |
|
|
|---|---|
|
|
| Safe | Can be deleted without consequence; regenerated automatically |
|
|
| Moderate | Review before deleting; may lose useful data |
|
|
| Risky | May break applications; requires careful inspection |
|
|
| Info only | Report size but do not offer deletion |
|
|
|
|
## Target Details
|
|
|
|
### User Logs (Safe)
|
|
- **Path**: `~/Library/Logs/`
|
|
- **Cleanup target**: `user-logs`
|
|
- **Notes**: Application crash reports and debug logs. Regenerated as needed.
|
|
|
|
### System Logs (Moderate, requires sudo)
|
|
- **Path**: `/var/log/`
|
|
- **Cleanup target**: not available via cleanup_execute.sh (requires sudo)
|
|
- **Notes**: System-level logs. Only clean old/rotated files. Active logs should not be deleted.
|
|
|
|
### User Caches (Safe, per-app)
|
|
- **Path**: `~/Library/Caches/`
|
|
- **Cleanup target**: `user-caches`
|
|
- **Notes**: App caches regenerated on next use. Some apps may need to re-download data. Browser caches can be large.
|
|
|
|
### Homebrew Cache (Safe)
|
|
- **Path**: `$(brew --cache)` (typically `~/Library/Caches/Homebrew/`)
|
|
- **Cleanup target**: `brew-cache`
|
|
- **Notes**: Downloaded bottles and source archives. `brew cleanup` handles this properly.
|
|
|
|
### npm Cache (Safe)
|
|
- **Path**: `~/.npm/_cacache/`
|
|
- **Cleanup target**: `npm-cache`
|
|
- **Notes**: Package download cache. `npm cache clean --force` is the proper way to clear.
|
|
|
|
### pip Cache (Safe)
|
|
- **Path**: `~/Library/Caches/pip/`
|
|
- **Cleanup target**: `pip-cache`
|
|
- **Notes**: Downloaded wheel/sdist cache. `pip cache purge` is the proper way to clear.
|
|
|
|
### Xcode DerivedData (Safe)
|
|
- **Path**: `~/Library/Developer/Xcode/DerivedData/`
|
|
- **Cleanup target**: `xcode-derived`
|
|
- **Notes**: Build artifacts and indexes. Rebuilt on next Xcode build. Can grow very large.
|
|
|
|
### Xcode Archives (Moderate)
|
|
- **Path**: `~/Library/Developer/Xcode/Archives/`
|
|
- **Cleanup target**: `xcode-archives`
|
|
- **Notes**: App Store submission archives. May be needed for symbolication of crash reports. Review before deleting.
|
|
|
|
### iOS DeviceSupport (Safe)
|
|
- **Path**: `~/Library/Developer/Xcode/iOS DeviceSupport/`
|
|
- **Cleanup target**: `ios-support`
|
|
- **Notes**: Debug symbols for connected iOS devices. Re-downloaded when device connects again.
|
|
|
|
### Docker (Moderate)
|
|
- **Cleanup target**: `docker`
|
|
- **Notes**: Uses `docker system prune -f`. Removes stopped containers, unused networks, dangling images. Does NOT remove named volumes. Never delete Docker's filesystem directly.
|
|
|
|
### Trash (Safe)
|
|
- **Path**: `~/.Trash/`
|
|
- **Cleanup target**: `trash`
|
|
- **Notes**: Items in Trash. User has already "deleted" these.
|
|
|
|
### Old Downloads (Info only)
|
|
- **Path**: `~/Downloads/` (files >90 days old)
|
|
- **Notes**: Report only. User should review manually. Never auto-delete downloads.
|
|
|
|
### Application Support Remnants (Risky)
|
|
- **Path**: `~/Library/Application Support/` orphaned directories
|
|
- **Notes**: Report only. Directories from uninstalled apps. Difficult to determine automatically which are truly orphaned. Manual review required.
|