An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


mac-cleanup-go


Preview-first TUI for cleaning macOS caches, logs, and temporary files.



GitHub Release
Go Report Card
CI
codecov
golangci-lint


English | 한국어

## 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).

![demo](assets/result_view.png)

## 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

![demo](assets/demo.gif)

## 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