About Mac Cleaner Cli
Mac Cleaner CLI frees disk space on macOS from the terminal. Running npx mac-cleaner-cli scans the Mac, lists what was found with sizes, lets the user tick exactly what to clean, and removes only that selection.
Categories are grouped by risk. Safe ones cover the Trash, temp files and browser caches. Moderate ones include system caches and logs, developer caches such as npm and Xcode DerivedData, orphaned node_modules, Homebrew leftovers and unused Docker data. Risky ones, hidden unless --risky is passed, include old downloads, iOS backups, duplicates and files over 500MB.
Other options include a dry run that previews deletions, optional backups to a folder instead of deleting, an app uninstaller that removes associated files, DNS cache flushing and a scriptable mode with JSON output for cron and CI. A menu bar app built on the same scanners adds daily automatic cleaning and a history of space freed.
The README says the tool works fully offline with no telemetry. It is MIT licensed, and its comparison table lists it as free against $39.95/year for CleanMyMac X and $9.99 one-time for DaisyDisk.
Key features
- Interactive selection of what to clean
- Dry run preview
- Optional backups with later restore
- JSON scan and non-interactive clean for cron and CI
- App uninstaller removes associated files
- Menu bar app with daily automatic cleaning
- Flush DNS cache and free purgeable space
Good fit for
- Clearing Xcode DerivedData and developer caches
- Removing old Homebrew versions
- Scheduled cleanups from cron
- Uninstalling apps with leftover files
Mac Cleaner Cli: questions and answers
- What is Mac Cleaner Cli used for?
- Mac Cleaner CLI is a free, open source macOS command-line tool that scans for caches, logs and junk files and deletes the ones you pick. It is a good fit for clearing Xcode DerivedData and developer caches, removing old Homebrew versions, and scheduled cleanups from cron.
- Is Mac Cleaner Cli open source?
- Yes. Mac Cleaner Cli is open source under the MIT licence. Its source code is on GitHub at guhcostan/mac-cleaner-cli and is written mainly in TypeScript.
- Is Mac Cleaner Cli free?
- Yes. Mac Cleaner Cli is open source, so the software itself is free to use.
- Can I self-host Mac Cleaner Cli?
- Yes. Mac Cleaner Cli can be self-hosted on your own server or infrastructure.
- What is Mac Cleaner Cli an alternative to?
- Mac Cleaner Cli is an open-source alternative to CleanMyMac and Cloudsmith. Other open-source alternatives to CleanMyMac include Onyx.
- Is Mac Cleaner Cli actively maintained?
- Yes. The most recent commit to Mac Cleaner Cli was on 14 November 2026, and the latest release is v1.4.0, published on 30 September 2026. The project has 2k stars on GitHub, with 40 added in the last 30 days.
Open-source alternatives to Mac Cleaner Cli
See all
Onyx
AI Tools
The open-source AI enterprise search platform that helps teams find information across all
OSSvs Glean★ 33k
Gitea
CI/CD & DevOps
Gitea - Git with a cup of tea! Painless self-hosted all-in-one software development servic
MITvs Bitbucket★ 59k
Harness
CI/CD & DevOps
Harness Open Source is an end-to-end developer platform with Source Control Management, CI
Apache-2.0vs GitHub Actions★ 39k
Harbor
CI/CD & DevOps
An open source trusted cloud native registry project that stores, signs, and scans content
Apache-2.0vs JFrog★ 30k
OneDev
CI/CD & DevOps
Git, issues, pull requests, CI/CD, packages, wiki, and workspaces in one place. Assign wor
MITvs Bitbucket★ 15k
GitLab Community Edition
CI/CD & DevOps
Open-core GitLab edition you install yourself, with Git hosting, CI/CD and issue tracking
MITvs GitHub★ 25k
CleanMyMac