- Distro Support: Arch, Debian/Ubuntu, Fedora/RHEL, openSUSE
- Package Managers: Pacman, APT, DNF, Zypper, AUR helpers (yay, paru)
- System Caches: Font, Mesa shader, WebKit, thumbnails, browser caches
- Docker Cleanup: Images, containers, volumes, build cache
- Media Servers: Plex and Jellyfin transcoding cleanup
- Automated Scheduling: Systemd timers for regular maintenance
yay -S moonbit
# or
paru -S moonbitcurl -sSL https://raw.githubusercontent.com/Nomadcxx/moonbit/main/install.sh | sudo bashRequirements: Go 1.21+
git clone https://github.com/Nomadcxx/moonbit.git
cd moonbit
make installer
sudo ./moonbit-installermoonbit # Launch interactive TUIThe TUI offers two scan modes:
- Quick Scan - Fast scan of safe caches only (~25 categories)
- Deep Scan - Comprehensive scan of all categories including system logs
# Scanning
moonbit scan # Standard scan
moonbit scan --mode quick # Quick scan (safe caches only)
moonbit scan --mode deep # Deep scan (all categories)
# Cleaning
moonbit clean # Preview what would be deleted (dry-run)
moonbit clean --force # Actually delete files
moonbit clean --mode quick # Clean only quick scan categories
moonbit clean --mode deep # Clean all scanned categories
# Package manager cleanup
moonbit pkg orphans # Remove orphaned packages
moonbit pkg kernels # Remove old kernels (Debian/Ubuntu)
# Docker cleanup
moonbit docker images # Remove unused images
moonbit docker all # Remove all unused resources
# Find duplicates
moonbit duplicates find # Find duplicate files
moonbit duplicates find --min-size 10240 # Only files >= 10KB
# Backups
moonbit backup list # List available backups
moonbit backup restore <name> # Restore a backupMoonBit includes systemd timers for automated maintenance:
- moonbit-scan.timer: Scans daily at 2 AM
- moonbit-clean.timer: Cleans weekly on Sunday at 3 AM
Option 1: Using the TUI (Recommended)
moonbit # Launch TUI and select "Schedule Scan & Clean"The TUI allows you to enable/disable timers and view their current status with a simple interface.
Option 2: Using the Installer
sudo ./moonbit-installer # Select timer schedule during installationOption 3: Manual Setup
# Enable and start scan timer
sudo systemctl enable --now moonbit-scan.timer
# Enable and start clean timer
sudo systemctl enable --now moonbit-clean.timer# View active timers
systemctl list-timers moonbit-*
# Check service logs
journalctl -u moonbit-scan.service
journalctl -u moonbit-clean.servicesudo systemctl edit moonbit-scan.timer
sudo systemctl edit moonbit-clean.timermake build # Build binary
make test # Run tests
make installer # Build installerGPL-3.0

