- Distro Support: Arch, Debian/Ubuntu, Fedora/RHEL, openSUSE
- Packaging: AUR,
.deband.rpmper release, a Nix flake, and static binaries - Package Managers: Pacman, APT, DNF, Zypper, AUR helpers (yay, paru)
- Safe Cache Cleanup: Package caches, temp files, thumbnails, font caches, logs, and conservative system caches
- App Cache Cleanup: Deep-scan discovery for IDE, Electron, AI-tool, Bottles, and Lutris cache/log/temp paths
- Docker Cleanup: Images, containers, volumes, build cache
- Media Servers: Plex and Jellyfin transcoding cleanup
- Duplicate Finder: Locate duplicate files with configurable minimum sizes
- Automated Maintenance: Systemd timer mode and daemon mode
- Safety Controls: Dry-runs by default, category filtering, and explicit force mode for deletion
- Desktop Launcher: Appears in the app menu, with a graphical password prompt
yay -S moonbit
# or
paru -S moonbitPrebuilt packages are attached to every release:
# Debian 13 (also Ubuntu 25.x)
sudo apt install ./moonbit_<version>_debian13_amd64.deb
# Ubuntu 24.04
sudo apt install ./moonbit_<version>_ubuntu24.04_amd64.deb
# Fedora 42+
sudo dnf install ./moonbit-<version>-1.fedora42.x86_64.rpmThese install /usr/bin/moonbit.
Every release carries static linux/amd64 and linux/arm64 binaries and a
SHA256SUMS file:
curl -fsSLO https://github.com/Nomadcxx/moonbit/releases/latest/download/moonbit-linux-amd64
curl -fsSLO https://github.com/Nomadcxx/moonbit/releases/latest/download/SHA256SUMS
sha256sum --check --ignore-missing SHA256SUMS
sudo install -Dm755 moonbit-linux-amd64 /usr/local/bin/moonbitcurl -sSL https://raw.githubusercontent.com/Nomadcxx/moonbit/main/install.sh | sudo bashRequires: go 1.24+, git, make. Installs /usr/local/bin/moonbit.
# Run without installing
nix run github:Nomadcxx/moonbit
# Build from a clone
git clone https://github.com/Nomadcxx/moonbit.git
cd moonbit
nix build
./result/bin/moonbit --helpThe derivation installs the systemd units under $out/lib/systemd/system with
ExecStart pointing at the store path.
Requirements: Go 1.24+, make
git clone https://github.com/Nomadcxx/moonbit.git
cd moonbit
make installer
sudo ./moonbit-installermoonbit # Launch interactive TUISearch for moonbit in your application menu to launch it without a terminal.
moonbit opens a terminal itself and asks for your password there. It honours
$TERMINAL when that names a terminal you actually have, then falls back
through ghostty, kitty, foot, alacritty, konsole, ptyxis, GNOME Console,
gnome-terminal, xfce4-terminal and others.
If it picks the wrong one, name yours explicitly:
MOONBIT_TERMINAL="myterm --exec-flag" moonbit --launcherSet it in ~/.config/environment.d/moonbit.conf to make it stick.
The TUI offers two scan modes:
- Quick Scan - Fast scan of conservative, commonly safe cleanup categories
- Deep Scan - Comprehensive scan including logs, system caches, and deep-only app cache categories
The Schedule screen can enable or disable moonbit's systemd timer and daemon modes, and it warns if both automation modes are active.
# Scanning
moonbit scan # Standard scan
moonbit scan --mode quick # Quick scan (safe caches only)
moonbit scan --mode deep # Deep scan (all categories)
moonbit scan --no-prompt # Scan without interactive clean prompt
moonbit scan --list-categories # Show available categories
moonbit scan --include-category "opencode Caches"
moonbit scan --exclude-category "System Logs"
# 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
moonbit clean --include-category "Lutris Prefix Temp" --force
moonbit clean --exclude-category "System Logs" --force
# 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
# Systemd journal
moonbit journal vacuum --size=500M # Preview
moonbit journal vacuum --time=14d --force # Apply
# 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 backup
# Daemon
moonbit daemon # Run continuous maintenance loop
moonbit daemon --scan 1h --clean 24h
moonbit daemon status # Show daemon statusmoonbit clean only previews until you pass --force. Some categories need sudo, depending on what you select and your sudo policy.
moonbit skips high-risk cleanup classes by default. Browser caches, model caches, and Steam shader and download caches stay out of the app cache set. Application paths cover cache, log, temp, crash-report, and old tool-output locations; session, project, storage, repository, plugin, and prefix data stay untouched.
moonbit never follows symlinks, and it re-checks every path against your config between scan and clean. A stale or hand-edited scan cache cannot widen what gets deleted. Reported "space freed" counts bytes measured on disk at deletion, not sizes recorded during the scan.
Log cleanup targets rotated files only. moonbit will not unlink a log a daemon still holds open: it truncates Docker container logs, and reclaims journal space through moonbit journal vacuum, which drives journalctl --vacuum-*.
Scope: automation cleans system-wide paths only. It never touches a user's home directory. The units run as root with
HOME=/rootandProtectHome=read-only, so home-relative categories (User Cache, Thumbnails, Trash, npm, pip, cargo) resolve under/root. On a desktop, your own caches are the ones filling the disk, and automation will not reclaim them. Runmoonbit scan && moonbit clean --forcefrom your session for those, or write asystemctl --userunit. See systemd/README.md.
moonbit has two automation modes. Use one at a time:
- Timer Mode: lightweight scheduled systemd services
- Daemon Mode: a long-running service with configurable scan and clean intervals
- moonbit-scan.timer: runs
moonbit scan --mode quick --no-promptdaily at 2 AM with a 30 minute randomized delay - moonbit-clean.timer: runs a quick pre-scan and
moonbit clean --force --mode quickweekly on Sunday at 3 AM with a 1 hour randomized delay
Option 1: Using the TUI (Recommended)
moonbit # Launch TUI and select "Schedule Scan & Clean"The TUI allows you to enable or disable timers and view their current status.
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.timersudo systemctl disable --now moonbit-scan.timer moonbit-clean.timer
sudo systemctl enable --now moonbit-daemon.serviceThe daemon defaults to scanning every 1 hour and cleaning every 24 hours. You can customize intervals by editing moonbit-daemon.service or by running the daemon directly:
moonbit daemon --scan 30m --clean 12h
moonbit daemon status
journalctl -u moonbit-daemon.service -fmake build # Build binary
make test # Run tests
make installer # Build installerGPL-3.0
— terminal-native tooling for the linux desktop.
More projects → · Sponsor ❤️

