🧹 Clean, uninstall, analyze, optimize, and monitor your Linux system.
A fast, terminal-first cleanup toolkit ported for Linux (Arch, Ubuntu/Debian, WSL2, Omarchy).
Important
This fork is no longer maintained. The upstream project now ships an official Linux version, built first for Omarchy and other Arch-based systems, with Debian/Ubuntu support. Please use the original instead:
-
Repository: tw93/Mole
linuxbranch -
Releases: Mole CLI for Linux releases
-
Install:
curl -fsSL https://raw.githubusercontent.com/tw93/Mole/linux/install.sh | bash
Please report Linux issues and send pull requests to tw93/Mole. The content below is kept for reference only.
Mole is an all-in-one terminal maintenance and cleanup tool for Linux. It helps you reclaim disk space, safely uninstall desktop and CLI applications along with their config/cache leftovers, explore disk usage visually, and monitor system health.
- Package & Cache Cleaner (
mo clean):- Package manager caches:
pacman(withpaccache), AUR helpers (yay,paru), andapt-get clean. - Developer caches:
npm,pnpm,yarn,pip. - Browser caches: Chrome, Chromium, Firefox runtime caches.
- Systemd journal: automatic vacuum (
journalctl --vacuum-time=7d). - XDG Trash cleanup.
- Package manager caches:
- Smart Application Uninstaller (
mo uninstall):- Categorized tagging:
[Desktop]: System GUI applications (.desktop)[Webapp]: Desktop web applications (e.g. Omarchy webapps in~/.local/share/applications/)[CLI]: Command-line tools and utilities
- Interactive multi-select paginated TUI menu with live search/filtering.
- Automatic XDG leftover removal (
~/.config/<app>,~/.cache/<app>,~/.local/share/<app>). - System safety filters: protects critical core packages (
base,linux*,systemd*,*keyring*,glibc).
- Categorized tagging:
- Visual Disk Explorer (
mo analyze):- Interactive TUI disk explorer written in Go.
- Fast directory traversal, size sorting, and safe deletion via XDG Trash.
- Live System Status (
mo status):- Real-time CPU, memory, disk, network, and battery statistics.
- Automation-ready JSON/NDJSON output.
- Project Artifact Purge (
mo purge):- Finds and cleans heavy build artifacts:
node_modules,target/,.next/,dist/,build/.
- Finds and cleans heavy build artifacts:
- Audit Logging (
mo history):- Operation logs recorded in
~/.local/state/mole/operations.log(or~/.cache/mole/).
- Operation logs recorded in
Install via one-line curl script:
curl -fsSL https://raw.githubusercontent.com/itzmail/mole_linux/main/install.sh | bashTo install directly to user path (~/.local/bin) without requiring root:
mkdir -p "$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/itzmail/mole_linux/main/install.sh | bash -s -- --prefix "$HOME/.local/bin"Make sure ~/.local/bin is in your $PATH.
Requires bash, go (1.21+), and make:
git clone https://github.com/itzmail/mole_linux.git
cd mole_linux
make build
./install.sh --prefix "$HOME/.local/bin"mo # Interactive main menu
mo clean # Clean caches, package archives, and logs
mo uninstall # Interactive application & package uninstaller
mo analyze # Visual disk explorer (interactive TUI)
mo status # System status and resource dashboard
mo purge # Clean developer build artifacts across projects
mo history # View cleanup operation history
mo update # Self-update to latest release
mo update --nightly # Update to latest git main branch
mo --help # Show help and available optionsmo uninstall # Open interactive TUI selection menu
mo uninstall --desktop # Interactive menu filtered to Desktop apps
mo uninstall --webapp # Interactive menu filtered to Webapps
mo uninstall --cli # Interactive menu filtered to CLI tools
mo uninstall --list # Print candidate list table
mo uninstall --json # Output candidates as JSON
mo uninstall Discord # Uninstall specific webapp or package
mo uninstall chromium # Uninstall specific desktop package
mo uninstall --dry-run bat # Preview package removal without deletingmo clean --dry-run # Preview cleanable items without deleting
mo uninstall --dry-run # Preview uninstaller plan
mo purge --dry-run # Preview purgeable project directories
mo clean --whitelist # Manage protected caches- Arch Linux & Derivatives: native
pacmanand AUR cache support (yay,paru). - Debian & Ubuntu: native
aptcache cleaning anddpkg-querypackage uninstall. - WSL2 (Windows Subsystem for Linux): full support for Ubuntu/Debian/Arch under WSL2.
- Omarchy Linux: full support for Omarchy Hyprland environment and desktop webapps.
- macOS: Mole requires macOS 12 or newer and supports both Intel and Apple Silicon Macs.
GNU General Public License v3.0 (GPL-3.0). Original Mole toolkit by @tw93.