On-device antivirus + junk/cleanup toolkit for macOS. One command, no telemetry, nothing leaves your Mac.
MacClean bundles two small shell scripts:
macclean— a CleanMyMac-style cleaner: user/system cache & log junk, dev-tool caches (Xcode, Homebrew, npm, pip, gradle, docker...), a disk-space analyzer, and an app uninstaller that also removes leftovers. Dry-run by default — nothing is deleted without--apply.avscan— a ClamAV wrapper for on-demand malware scanning. Also reachable asmacclean scan.
git clone https://github.com/RouterGlock/MacClean.git cd MacClean ./install.sh # copies macclean + avscan into ~/.local/bin, fixes PATH ./install.sh --with-av # ...and installs ClamAV via Homebrew + fetches signatures
Open a new shell afterwards so ~/.local/bin is on your PATH.
| Command | What it does |
|---|---|
macclean checkup [-u] |
Read-only overview: AV quick-scan of ~/Downloads + junk + dev + disk-space previews. Deletes nothing. -u refreshes ClamAV signatures first. |
macclean junk [--apply] [--deep] |
Caches, logs, Trash, saved app state, Mail downloads. --deep adds sandboxed container caches. |
macclean dev [--apply] [--deep] |
Xcode/SwiftPM/simulator caches; brew/npm/yarn/pip/CocoaPods/gradle/go caches; on --apply also runs brew cleanup, simctl delete unavailable, docker system prune. |
macclean all [--apply] [--deep] |
junk + dev. |
macclean space [--path DIR] [--top N] [--days N] [--dupes] |
Report only. Largest folders/files, old Downloads, iOS backups, optional duplicate scan. |
macclean uninstall <App|/path/App.app> [--apply] |
Finds the app + its ~/Library leftovers by name & bundle id; prints sudo rm lines for system-level items. |
macclean scan [-u] [-q] [-a] [-v] [PATH...] |
ClamAV scan (delegates to avscan). -u update signatures first, -q quarantine, -a no size caps. |
- Dry-run is the default. Every destructive subcommand previews paths + sizes and exits without touching anything.
--applyperforms a hardrm -rf.--yesskips the confirmation prompt.spacehas no--apply— it never deletes.junk/devrefuse to run as root, and the internal delete list hard-refuses/,$HOME,~/Library,~/Documents,~/Desktop.junk/dev/all/uninstallruns are logged to~/.local/var/log/macclean/<sub>-<timestamp>.log;avscanlogs to~/.local/var/log/avscan/.
Download MacClean.app.zip from the latest release.
Unzip, then double-click MacClean.app — pick Checkup / Junk / Dev caches / Scan
Downloads (or the — APPLY variants) from a menu; the run opens in Terminal.
The app is unsigned, so the first launch is right-click → Open (or
xattr -dr com.apple.quarantine MacClean.app). It just calls the macclean you
installed above.
Build it yourself: app/build-app.sh.
./scripts/install-schedule.sh
Installs a launchd agent (com.routerglock.macclean.checkup) that runs
macclean checkup --update every Sunday at 10:00 (refreshes ClamAV
signatures, then the read-only checkup), appending to
~/.local/var/log/macclean/checkup.log. Remove with
./scripts/install-schedule.sh --uninstall.
MIT © 2026 RouterGlock