Mac Cleaner Cli

Open source

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.

Open-source alternative to

npmjs.com
Mac Cleaner Cli homepage screenshot
GitHub stars
2k
Last 30 days
+40(+2%)
Last commit
8 days ago
Repository age
12 months
Version
v1.4.0
Licence
MIT
Self-hosted
Yes

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
Tags
macos
cli
disk-cleaner
cache-cleaner
homebrew
xcode
developer-tools
typescript

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

SaaS alternatives to Mac Cleaner Cli

See all