https://github.com/2ykwang/mac-cleanup-go
TUI macOS cleaner that scans caches/logs, shows sizes/paths, lets you select what to delete before Trash.
https://github.com/2ykwang/mac-cleanup-go
caches clean cleanup cli disk-cleanup golang homebrew mac-cleanup macos optimize terminal-ui tui
Last synced: 5 months ago
JSON representation
TUI macOS cleaner that scans caches/logs, shows sizes/paths, lets you select what to delete before Trash.
- Host: GitHub
- URL: https://github.com/2ykwang/mac-cleanup-go
- Owner: 2ykwang
- License: mit
- Created: 2026-01-01T14:34:49.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-20T23:44:54.000Z (5 months ago)
- Last Synced: 2026-01-21T00:11:34.463Z (5 months ago)
- Topics: caches, clean, cleanup, cli, disk-cleanup, golang, homebrew, mac-cleanup, macos, optimize, terminal-ui, tui
- Language: Go
- Homepage:
- Size: 17.1 MB
- Stars: 181
- Watchers: 2
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go-with-stars - mac-cleanup-go - first TUI for cleaning macOS caches, logs, and temporary files. | 2026-05-09 | (Go Tools / Other Software)
- awesome-go - mac-cleanup-go - Preview-first TUI for cleaning macOS caches, logs, and temporary files. (Software Packages / Other Software)
- awesome-tuis - mac-cleanup-go
- fucking-awesome-go - mac-cleanup-go - Preview-first TUI for cleaning macOS caches, logs, and temporary files. (Software Packages / Other Software)
README
mac-cleanup-go
Preview-first TUI for cleaning macOS caches, logs, and temporary files.
## Overview
- Preview items before delete and exclude what you want.
- By default, items go to Trash; only the Trash category empties it permanently.
- Risky items start excluded; manual categories show guides only.
- Scope: caches/logs/temp and selected app data (no system optimization or uninstaller).

## Quick Start
Install via Homebrew:
```bash
brew install 2ykwang/2ykwang/mac-cleanup-go
```
Run:
```bash
mac-cleanup
mac-cleanup --update # update via Homebrew
```
Uninstall:
```bash
brew uninstall mac-cleanup-go
```
> Tip: Grant Full Disk Access to your terminal to clean Trash and restricted locations.
> System Settings -> Privacy & Security -> Full Disk Access

## Safety & deletion policy
- 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).
- Built-in scans for Homebrew, Docker, and old downloads (brew/docker output or last-modified time filtering).
## What it does
- Items are previewed before delete.
- By default, items go to Trash; only the Trash category empties it permanently.
- Risky categories start selected with all items excluded.
- Manual categories never delete automatically and only show guidance.
## Impact levels
- safe: auto-regenerated caches/logs.
- moderate: may require re-download or re-login.
- risky: user data possible; category starts selected with all items excluded.
- manual: no automatic deletion; shows an app guide only.
## Targets (v1.3.6)
- Total targets: 107.
- Groups: System 7, Browsers 10, Development 35, Applications 52, Storage 3.
- Cleanup methods: trash 101, permanent 1, builtin 3, manual 2.
- Builtins: homebrew, docker, old-downloads (built-in scanners using brew/docker output or last-modified time filtering).
- Manual: telegram, kakaotalk (no automatic deletion; surfaces large data like chat caches).
## Usage notes
- Full Disk Access helps scan/clean restricted locations.
- Version check: `mac-cleanup --version`.
Key bindings
List view:
- `Up`/`Down` or `k`/`j`: move
- `Space`: select category
- `a`: select all, `d`: deselect all
- `Enter` or `p`: preview selection
- `?`: help, `q`: quit
Preview view:
- `Up`/`Down` or `k`/`j`: move
- `h`/`l`: previous/next category
- `Space`: toggle exclude
- `Enter`: drill into directory
- `/`: search, `s`: sort, `o`: open in Finder
- `a`: include all, `d`: exclude all
- `y`: delete (confirm), `esc`: back
Confirm view:
- `y` or `Enter`: confirm
- `n` or `esc`: cancel
## Alternatives
- [mac-cleanup-py](https://github.com/mac-cleanup/mac-cleanup-py) - Python cleanup script for macOS
- [Mole](https://github.com/tw93/Mole) - Deep clean and optimize your Mac
## License
MIT