A terminal-based system cleaner for Arch Linux with an interactive TUI (Text User Interface).
- Interactive TUI - Beautiful terminal interface built with Bubble Tea
- Multiple Cleaning Categories:
- Package Cache - Clean old pacman package cache
- Orphan Packages - Remove unused dependencies
- System Cache - Clean
/var/cache - User Cache - Clean
~/.cache - Journal Logs - Vacuum systemd journal logs
- Thumbnails - Remove cached thumbnails
- Trash - Empty user trash
- Temp Files - Clean
/tmpand/var/tmp
- Responsive Design - Adapts to terminal size (desktop/mobile layouts)
- Safe Operations - Confirmation dialogs and password protection for root operations
- Real-time Scanning - Shows disk space usage for each category
# Clone the repository
git clone https://github.com/Gylmynnn/goclean.git
cd goclean
# Build
go build -o goclean
# Optional: Install to PATH
sudo mv goclean /usr/local/bin/- Go 1.25 or later
- Arch Linux (or Arch-based distributions)
pacmanandpaccache(usually pre-installed on Arch)
# Run the application
./goclean
# Show help
./goclean -h| Key | Action |
|---|---|
↑ / k |
Move cursor up |
↓ / j |
Move cursor down |
Enter |
View category details |
Esc / q |
Go back / Quit |
| Key | Action |
|---|---|
Space |
Toggle selection |
a |
Select all |
n |
Deselect all |
| Key | Action |
|---|---|
c |
Clean selected items |
r |
Refresh/rescan |
| Key | Action |
|---|---|
← / → |
Switch between Cancel/Confirm |
y |
Confirm |
n |
Cancel |
╭────────────────────────────────────────────────────────────╮
│ GoClean Arch Linux System Cleaner │
╰────────────────────────────────────────────────────────────╯
Categories
> [✓] 📦 Package Cache 1.2 GiB
[ ] 🔗 Orphan Packages 256.0 MiB
[ ] 🗄️ System Cache 512.0 MiB
[✓] 💾 User Cache 2.1 GiB
[ ] 📋 Journal Logs 128.0 MiB
[ ] 🖼️ Thumbnails 64.0 MiB
[ ] 🗑️ Trash 320.0 MiB
[ ] 📁 Temp Files 48.0 MiB
╭────────────────────────────────────────────────────────────╮
│ 2 items selected • 3.3 GiB to be freed │
╰────────────────────────────────────────────────────────────╯
goclean/
├── main.go # Entry point
├── go.mod # Go module definition
├── go.sum # Dependencies checksum
└── internal/
├── cleaner/
│ ├── cleaner.go # Cleaning operations
│ └── types.go # Type definitions
├── scanner/
│ └── scanner.go # System scanning
└── tui/
├── tui.go # Main TUI logic
├── components/
│ └── components.go
└── styles/
└── styles.go
- Scanning - GoClean scans your system for cleanable items across multiple categories
- Selection - Navigate and select categories/items you want to clean
- Confirmation - Review your selection and confirm the cleaning operation
- Authentication - For system-level operations, enter your sudo password
- Cleaning - GoClean removes selected items and reports the freed space
- Operations that require root access will prompt for password
- Orphan packages are marked as "dangerous" and require explicit selection
- All cleaning operations show a confirmation dialog before proceeding
- Package cache cleaning keeps the latest version by default (
paccache -rk1)
- Bubble Tea - TUI framework
- Bubbles - TUI components
- Lip Gloss - Style definitions
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.