A safe, performant, and feature-rich Linux system cleaner written in Go. featuring a modern TUI (Text User Interface) and a scriptable CLI mode.
- Interactive TUI: Visual dashboard to select and run cleaners.
- APT Cache: Cleans
/var/cache/apt/archives. - System Logs: Vacuums
journaldand removes old log files. - Trash: Empties user trash (
~/.local/share/Trash). - Caches:
- Thumbnails (
~/.cache/thumbnails) - Browsers (Chrome, Firefox, Brave, etc.)
- Go Build Cache
- Generic Cache Scanner
- Thumbnails (
- Docker: Prunes unused system objects.
- Large Files: Interactive scanner for old (>30 days), large (>100MB) files.
git clone https://github.com/paperalt/goclean.git
cd goclean
go build -ldflags "-s -w" -o goclean ./cmd/gocleanSimply run the binary to launch the TUI:
./goclean- Use Up/Down keys to navigate.
- Use Space to toggle selection.
- Press Enter to clean selected items.
Use --no-tui for standard command-line output.
# Dry run (simulate without deleting)
./goclean --no-tui --dry-run
# Run non-interactively (skip confirmations)
sudo ./goclean --no-tui --yesNote: Some cleaners (APT, Docker, Logs) may require
sudoprivileges.
- Dry Run: Always verify with
--dry-runfirst. - Confirmations: The tool asks for confirmation before deleting large files or running mass cleanups (unless
--yesis used). - Exclusions: Hidden folders are skipped during large file scans to protect config files.
MIT
