2ykwang/mac-cleanup-go
Acerca de
Limpiador de macOS con interfaz TUI que analiza cachés y registros, muestra sus tamaños y rutas, y permite elegir qué enviar a la papelera.
Herramientas de desarrolloCrecimiento de estrellas medido
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Originalmac-cleanup-go
Preview-first TUI and CLI for cleaning macOS caches, logs, and temporary files.
Overview
- Select items that take up space and delete them yourself.
- By default, items go to Trash; only the Trash and Shell History Residue categories delete permanently.
- Risky categories are unselected by default; even when selected, items are auto-excluded. (Include them in Preview to delete.)
- Manual categories show guides only.
- Scope: caches/logs/temp and selected app data (no system optimization or uninstaller).

Quick Start
1) Install
brew install mac-cleanup-go
Or download the archive from GitHub Releases.
2) Optional: Full Disk Access (needed for Trash/restricted locations) System Settings -> Privacy & Security -> Full Disk Access -> add Terminal
3) Run
mac-cleanup
Tip: Use Enter to preview, then y to proceed with deletion. Press ? to see key bindings.

- Update:
brew upgrade mac-cleanup-goormac-cleanup update. - Uninstall:
brew uninstall mac-cleanup-go. - Debug:
mac-cleanup --debugsaves log to~/.config/mac-cleanup-go/debug.log.
Key bindings
List view:
Up/Downork/j: moveSpace: select categorya: select all,d: deselect allEnterorp: preview selection?: help,q: quit
Preview view:
Up/Downork/j: moveh/l: previous/next categorySpace: toggle excludeEnter: drill into directory/: search,s: sort,o: open in Findera: include all,d: exclude ally: delete (confirm),esc: back
Confirm view:
yorEnter: confirmnoresc: cancel
CLI mode
Scan and clean without the TUI. targets, scan, and clean take target IDs; --json gives machine-readable output.
mac-cleanup scan # Sizes per target (read-only)
mac-cleanup scan system-cache --items # Largest items in one target
mac-cleanup clean npm go-build --dry-run # Preview exactly what will be cleaned
mac-cleanup clean npm go-build # Clean (asks to confirm; --yes skips)
mac-cleanup targetslists every target ID without scanning.mac-cleanup selectsaves targets formac-cleanup clean --selected.- Risky targets are only cleaned item by item with
--item <path>. homebrewmoves only the scanned download cache to Trash. Installed formula versions are kept, and--itemaccepts the scanned cache root.- Exit codes:
0ok,1error,2usage error or confirmation needed,3some items failed. - Run
mac-cleanup help <command>for all flags.
Example output
1) Select targets
$ mac-cleanup select
Select cleanup targets ● safe ○ moderate
─────────────────────────────────────────────────────────
Name Size
[ ] ● Trash 0 B
[✓] ○ App Caches 3.2 GB
[✓] ○ System Logs 259.7 MB
▸ [✓] ● Go Build Cache 845.0 MB
[✓] ○ Docker 2.8 GB
[✓] ● Homebrew Cache 1.5 GB
[ ] ● Chrome Cache 0 B
─────────────────────────────────────────────────────────
Selected: 5
↑/↓ Move space Select s Save ? Help q Cancel
2) Preview / Clean
$ mac-cleanup clean --selected --dry-run
Dry Run Report
--------------
Mode: Dry Run
Summary Highlights
Freed (dry-run): 8.6 GB 1. App Caches - 3.2 GB (523 items)
2. Docker - 2.8 GB (12 items)
3. Homebrew Cache - 1.5 GB (1 items)
Details
STATUS CATEGORY ITEMS SIZE
OK App Caches 523 3.2 GB
OK Docker 12 2.8 GB
OK Homebrew Cache 1 1.5 GB
OK Go Build Cache 89 845.0 MB
OK System Logs 67 259.7 MB
Use with AI agents
mac-cleanup ships an Agent Skill that teaches coding agents (Claude Code, Codex, Copilot, ...) the scan → preview → approve → clean workflow. Agents can read it with mac-cleanup skill without installing it.
To install the latest skill from the repository:
npx skills add 2ykwang/mac-cleanup-go --skill mac-cleanup -g
Or save the copy bundled with your installed version:
mkdir -p ~/.claude/skills/mac-cleanup
mac-cleanup skill > ~/.claude/skills/mac-cleanup/SKILL.md
Agents use --json output and never clean without --yes, which the skill only allows after you approve a dry run.
Try prompts like:
Find what's using disk space in my development caches. Show me the largest cleanup candidates and what each one contains.
Clean my npm and Go build caches.
Find and clean up caches on my Mac.
How it works & safety
- Scans known cache/log/temp paths across apps and tools in parallel.
- Lets you preview items and exclude what you want to keep.
- Labels targets by impact level (safe, moderate, risky, manual).
- SIP-protected paths are excluded from scan/cleanup.
- Built-in scans for Homebrew, Docker, old downloads, stale project build caches, and old Claude Code/Codex releases (command output, last-modified time, or the active release).
Impact levels
- safe: auto-regenerated caches/logs.
- moderate: may require re-download or re-login.
- risky: user data possible; items start excluded.
- manual: no automatic deletion; shows an app guide only.
Targets (as of v1.7.0)
- Total targets: 202.
- Groups: System 14, Browsers 15, Development 71, Applications 97, Storage 5.
- Cleanup methods: trash 192, permanent 2, builtin 6, manual 2.
- Builtins: homebrew, docker, old-downloads, project-cache, claude-code-versions, codex-daemon-releases.
- Manual: telegram, kakaotalk (no automatic deletion; surfaces large data like chat caches).
- Counts are release-based and may change over time.
Alternatives
- mac-cleanup-py - Python cleanup script for macOS
- Mole - Deep clean and optimize your Mac
License
MIT
Explorar proyectos relacionados
Cargando…