Mole
🐹 Clean, uninstall, analyze, optimize, and monitor your Mac. Free open-source CLI, plus a native Mac app.
💡 Prefer a native app? Mole for Mac brings cleanup, app management, maintenance, disk maps, and live status into one lightweight, VoiceOver-ready app. One license covers 2 Macs with lifetime updates and a 14-day refund. The CLI stays free and open source.
Features
- All-in-one toolkit: Combines CleanMyMac, AppCleaner, DaisyDisk, and iStat Menus in a single binary
- Deep cleaning: Removes caches, logs, leftovers, and orphaned app data to reclaim gigabytes of space
- Smart uninstaller: Removes apps plus launch agents, preferences, and hidden remnants
- Disk insights: Visualizes usage, finds large files, rebuilds caches, and refreshes system services
- Live monitoring: Shows real-time CPU, GPU, memory, disk, and network stats
Quick Start
Mole requires macOS 12 or newer and supports both Intel and Apple Silicon Macs.
Install via Homebrew
brew install mole
If Homebrew no longer supports your macOS version, use the script below instead.
Or via script
curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash
Mole is built for macOS. An experimental Windows version lives in the windows branch.
Run
mo # Interactive menu
mo clean # Deep cleanup + already-uninstalled app leftovers
mo uninstall # Remove installed apps + their leftovers
mo optimize # Refresh caches & services
mo analyze # Visual disk explorer (or 'mo analyse')
mo status # Live system health dashboard
mo purge # Clean project build artifacts
mo installer # Find and remove installer files
mo touchid # Configure Touch ID for sudo
mo completion # Set up shell tab completion
mo update # Update Mole
mo update --nightly # Update to latest unreleased main build, script install only
mo remove # Remove Mole from system
mo --help # Show help
mo --version # Show installed version
Preview safely
mo clean --dry-run
mo uninstall --dry-run
mo optimize --dry-run
mo purge --dry-run
mo installer --dry-run
mo history
mo history --json
mo clean --dry-run --debug # Preview + detailed logs
mo optimize --whitelist # Manage protected optimization rules
mo clean --whitelist # Manage protected caches
mo purge --paths # Configure project scan directories
mo analyze /Volumes # Analyze external drives only
mo analyze /private/tmp # Review user-owned temporary directories
Selections made with mo clean --whitelist persist in ~/.config/mole/whitelist.
Other install options
To install a specific release, pass any tag from the releases page, with or without its leading V. To track the development branch instead, pass main:
curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash -s -- 1.51.0
curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash -s -- main
main installs unreleased code from the default branch, so expect rough edges. latest still works as a legacy alias for main; despite the name it does not install the newest stable release.
The script normally installs to /usr/local/bin, which may ask for an administrator password. Install into a user-owned directory if you want future mo update runs to stay password-free:
mkdir -p "$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash -s -- --prefix "$HOME/.local/bin"
export PATH="$HOME/.local/bin:$PATH"
Add the same PATH export to ~/.zshrc or your shell profile for new terminals. Mole updates the installation you invoked, so it keeps using this directory. Commands that change system-owned files may still request administrator access.
Prefer a walkthrough? Watch the Mole tutorial video by PAPAYA 電腦教室.
Safety
Mole can remove files, so it validates paths, protects shared and system-owned locations, and asks for confirmation when an action needs it. When Mole cannot prove an item is safe to change, it skips or refuses it.
clean,uninstall,purge,installer, andremovecan delete files. Review them with--dry-runfirst, and add--debugwhen needed.mo analyzemoves selected items to Trash after confirmation.- Cleanup activity is recorded in
~/Library/Logs/mole/operations.log; review it withmo historyor disable it withMO_NO_OPLOG=1. - Protect caches with
mo clean --whitelist, or maintenance items withmo optimize --whitelist.
Review SECURITY.md and SECURITY_AUDIT.md for reporting guidance, safety boundaries, and current limitations.
Features in Detail
The examples below are shortened. Available items, sizes, and skip reasons depend on your Mac.
Clean
mo clean reviews known-safe caches, logs, temporary files, developer artifacts, and leftovers from apps that are no longer installed. Use mo clean --dry-run to preview eligible paths, and mo clean --whitelist to protect caches you want to keep.
$ mo clean
Clean Your Mac
⚙ Apple Silicon | Free space: 219.0GB
➤ User essentials
✓ User app cache · 18 items, 2.4GB
✓ User app logs · 7 items, 12.8MB
✓ Trash · emptied, 9 items
➤ App caches
✓ App Store cache · 8 items, 248.5MB
➤ Browsers
✓ Safari cache · 24 items, 642.1MB
✓ Chrome cache · 31 items, 1.2GB
➤ Developer tools
✓ npm cache · cleaned
◎ pnpm cache · skipped (pnpm busy)
✓ Xcode runtime volumes · removed 2, 3 in use
======================================================================
Cleanup complete
Tracked cleanup: 4.5GB | Items cleaned: 97 | Categories: 4
Free space: 223.5GB (+4.5GB)
======================================================================
Uninstall
mo uninstall removes an installed app together with related files that Mole can tie back to that app. It keeps shared data when another installed copy still uses it. Use mo uninstall --dry-run to review the plan. If the app is already gone, use mo clean to look for leftovers.
$ mo uninstall
Select Apps to Remove 1/3 selected
➤ ● Photoshop 2024 4.20GB | 2mo ago
○ IntelliJ IDEA 2.80GB | 3d ago
○ Premiere Pro 3.40GB | 2w ago
Files to be removed:
✓ Photoshop 2024, 12.80GB
✓ /Applications/Adobe Photoshop 2024/Adobe Photoshop 2024.app
✓ ~/Library/Application Support/Adobe/Adobe Photoshop 2024
✓ ~/Library/Preferences/com.adobe.Photoshop.plist
======================================================================
Uninstall complete
Removed 1 app, freed 12.80GB: Photoshop 2024
======================================================================
Optimize
mo optimize runs bounded maintenance for supported Finder, network, database, and macOS services. Tasks that are unnecessary, unsafe at the moment, or unavailable are skipped with a reason. Use mo optimize --dry-run to preview the pass and mo optimize --whitelist to exclude tasks or path patterns.
$ mo optimize
Optimize
⚙ System 18/32 GB RAM | 616/926 GB Disk | Uptime 6d
PERFORMANCE DIAGNOSIS
✓ No sustained high-CPU bottleneck detected
➤ DNS & Spotlight Check
→ DNS cache flushed
→ Spotlight index verified
➤ Finder Cache Refresh
→ QuickLook thumbnails refreshed
→ Icon services cache rebuilt
➤ Database Optimization
◎ Close these apps before database optimiza