The open source Mac cleaner, optimizer, and malware scanner.
Created and licensed by Apex Studio LLC. A free, open source alternative to CleanMyMac, built with Swift 6 and SwiftUI.
English | 简体中文 | 繁體中文 | Deutsch | Français | Русский
Screenshots · Features · Installation · Comparison · Architecture · Contributing
Install with Homebrew (tap, until the cask is merged into homebrew-core):
brew tap coldrazer/cleanr && brew install --cask cleanrOr grab the latest DMG. It is notarized by Apple, so it just opens, no right-click, no warnings, no Terminal.
A full-featured Mac cleaner should not cost a yearly subscription or ask you to trust a black box with deep access to your files. CleanR gives you the whole toolkit with source available for inspection.
- Free and open source. No subscription, no in-app purchases, no "upgrade to Pro", no nag screens. Licensed under Apache 2.0: you may use, modify, and distribute CleanR under its terms.
- Zero telemetry. No analytics, no crash reporter, no trackers, no server to phone home to. And you do not have to take our word for it, verify it yourself in two commands.
- Every major CleanMyMac tool, in one app. 22 modules across cleanup, protection, performance, applications, and disk insight, plus a menu-bar widget.
- Safe by design. Trash-first deletion, a protected-paths blocklist, symlink and TOCTOU guards, and a
SafetyGuardthat validates every path. It is built to never lose your data. - Signed builds and open source. Official signed builds are verified by your Mac at launch, and the source is open for inspection under Apache 2.0.
- Built with Lemonade. Smart Scan's code was first drafted with Lemonade running locally, then refined with other AI models. See docs/lemonade-smartscan.md.
|
|
|
|
|
|
| Module | What it does |
|---|---|
| Smart Scan | One click runs cleanup, protection, and performance modules together with live progress, then shows exactly what it freed per module |
| System Junk | 16+ scan categories: user and system caches, logs, language files, broken preferences, broken login items, document versions, iOS backups, Xcode junk, package-manager / IDE / AI-tool caches, deleted-user leftovers, and Universal Binary thinning (finds fat Mach-O binaries carrying both arm64 and x86_64 and rewrites them to your native arch via lipo, honoring Cancel) |
| Mail Attachments | Finds cached attachments from Apple Mail, Outlook, and Spark |
| Trash Bins | Empties the Trash across every location, including external drives |
| Project Junk | Finds regenerable build folders across your projects: node_modules, .next, dist, Rust and Maven target, Gradle build, Python virtualenvs, and CocoaPods Pods. A folder only counts when the files next to it confirm the project type, and dist and Pods only when your .gitignore names them. Everything goes to the Trash |
| Disk Hogs | Shows how much space Docker and Xcode simulators take. Prunes stopped containers, dangling images, and dangling build cache (each behind a confirmation), and deletes unavailable simulators and old simulator runtimes. Docker volumes and the newest runtime for each platform are never touched |
| Clean History | Lists your recent cleans (the last 30 days, up to 20) and puts a whole clean back from the Trash in one click. The history stays on your Mac in ~/Library/Logs/CleanR/clean-history.json, readable only by your user account, and is never sent anywhere |
| Module | What it does |
|---|---|
| Malware Removal | Signature-based scanning at 3 depths (Quick / Balanced / Deep): launch agents and daemons, browser extensions, and known adware/malware patterns (curated list, not an antivirus, and it says so) |
| Privacy | Cleans Safari, Chrome, and Firefox history, cookies, and cache, with time filters. Safari bookmarks are never touched |
| Browser Extensions | Lists the extensions installed in Safari, Chrome, Brave, Edge, Arc, and Firefox. Chromium and Firefox extensions you installed yourself can go to the Trash while that browser is closed; ones installed by policy or by the browser itself are shown but left alone. Safari extensions link to Safari's settings |
| Saved Wi-Fi | Lists your preferred wireless networks and forgets the ones you pick |
| Permissions Overview | A read-only, by-app view of which privacy (TCC) grants each app holds, the angle System Settings does not give you. Every action deep-links to System Settings, which owns the toggles |
| Module | What it does |
|---|---|
| Optimization | Manage login items and launch agents with per-item enable/disable |
| Maintenance | System tasks: free RAM, run maintenance scripts, verify the startup disk, rebuild Launch Services, reindex Spotlight, flush DNS, thin Time Machine snapshots. Tasks are tagged by severity, "Run Safe Tasks" is sequential, and the admin password is asked once |
| Module | What it does |
|---|---|
| Uninstaller | A pattern-matching engine that finds every associated file across 17+ Library subdirectories (including apps nested in vendor subfolders). Complete removal, Reset to Defaults (wipe an app's caches and preferences while keeping the app), and unused-app detection |
| Unused Apps | Finds apps you have not opened in 3, 6, or 12 months, using Spotlight's last-used date, sorted by size. Running apps are never listed, and when Spotlight has no usage data it says so instead of guessing. One click hands an app to the Uninstaller |
| Extensions | Review third-party preference panes, Internet Plug-Ins, and Safari extensions. User-installed panes and plug-ins can go to the Trash |
| Updater | Checks installed apps for updates via their own Sparkle appcast feeds (reads version info only, sends nothing about you) |
| Module | What it does |
|---|---|
| Space Lens | Squarified-treemap visualization of disk usage with drill-down navigation |
| Large & Old Files | Finds files over 50 MB, sorted by size and last access date |
| Duplicates | Progressive detection (size grouping, partial SHA-256, full hash, inode verification), plus a Consolidate mode that reclaims space with APFS copy-on-write clones without deleting a single copy |
| Shredder | Secure file erasure with standard, permanent, and secure-overwrite modes |
| Shortcut | Action |
|---|---|
| ⌘R | Start a scan in the current module |
| ⌘K | Clean the current selection (when results are showing) |
| ⌘1 to ⌘9 | Jump to the first nine sidebar modules |
| ⌘, | Open Settings |
| CleanR | CleanMyMac | Pearcleaner | PureMac | OnyX | Mole | |
|---|---|---|---|---|---|---|
| Price | Free | $39.95/yr | Free | Free | Free | Free (CLI) |
| License | ✅ Apache 2.0 | Proprietary | ✅ Fair-code | ✅ MIT | Proprietary | ✅ MIT |
| Telemetry | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | |
| Native GUI app | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ CLI (paid GUI separate) |
| Smart Scan (one-click) | ✅ | ✅ | ❌ | ➖ Partial | ❌ | ➖ Interactive CLI |
| System Junk (16+ categories) | ✅ | ✅ | ➖ | ✅ | ➖ Limited | ✅ |
| Universal Binary thinning | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Malware scanner | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Browser privacy cleaner | ✅ | ✅ | ❌ | ❌ | ➖ | ❌ |
| Uninstaller with leftover detection | ✅ | ✅ | ✅ Focus | ❌ | ❌ | ✅ |
| Duplicate finder (+ consolidation) | ✅ | ➖ | ❌ | ❌ | ❌ | ❌ |
| Disk treemap visualizer | ✅ | ❌ | ❌ | ❌ | ❌ | ➖ Analyzer |
| Menu bar system monitor | ✅ | ✅ Menu | ❌ | ❌ | ❌ | ❌ |
| Maintenance scripts | ✅ | ✅ | ❌ | ❌ | ✅ Strong | ➖ |
| Notarized by Apple | ✅ | ✅ | ✅ | ✅ | ✅ | N/A |
| macOS version | 14+ | 13+ | 13+ | 13+ | varies | varies |
CleanMyMac is a great product, and the people who want a polished, supported experience should happily pay for it. CleanR is for everyone who would rather inspect the source and pay no subscription.
Choose System, Deutsch, Français, Русский, 简体中文, 繁體中文, or English in Settings → Interface Language. German, French, and Traditional Chinese translate static interface strings; interpolated messages retain the English wording and plural rules for now (Traditional Chinese falls back to Simplified). The main window and menu-bar widget share the language preference.
CleanR ships a cask in this repository (Casks/cleanr.rb) and a tap that is kept in sync with every release, so install it from the tap:
brew tap coldrazer/cleanr && brew install --cask cleanrOnce the cask is merged into homebrew-core the tap is no longer needed and plain brew install --cask cleanr works; the app's own update check covers both cases.
It is notarized by Apple, so it launches from Spotlight or Applications with no warnings and no extra steps.
Other ways to install (one-line script, DMG, build from source)
One-line installer
curl -fsSL https://raw.githubusercontent.com/coldrazer/CleanR/main/scripts/install.sh | bashDownloads the latest DMG, verifies its code signature and Gatekeeper assessment, and installs the app to /Applications. Read the script first if you would rather not pipe it straight into a shell: it is in this repository at scripts/install.sh.
DMG download
Grab the latest DMG from Releases and drag CleanR to your Applications folder.
Build from source
git clone https://github.com/coldrazer/CleanR.git
cd CleanR
swift build
swift test # run the full 1,088-test suite
bash scripts/build-dmg.sh # build a local DMG (unsigned)Requires the Swift 6 toolchain (Xcode 16+).
Homebrew core?
The cask currently lives in this project's own tap (coldrazer/cleanr). A pull request to add it to homebrew-core is on the roadmap; until that merges, brew install --cask cleanr without the tap fails with Error: Cask 'cleanr' is unavailable.
A few modules (Mail Attachments, Privacy, Malware) need Full Disk Access to scan protected areas:
- Open System Settings, Privacy & Security, Full Disk Access
- Click + and add CleanR.app
- Restart CleanR
Homebrew install:
brew uninstall --zap --cask cleanrDMG or manual install (also handles a Homebrew install):
curl -fsSL https://raw.githubusercontent.com/coldrazer/CleanR/main/scripts/uninstall.sh | bashBoth remove CleanR plus its preferences, caches, logs, and database under ~/Library.
CleanR is code-signed with an Apple Developer ID and notarized by Apple. That matters more for a cleaning app than for almost anything else you install, because you are about to give it deep access to your files, and you deserve to know that what runs on your Mac is genuinely ours and untampered with. All of this is enforced by your own Mac, not just promised by us:
- Apple has scanned it. Every release is submitted to Apple and checked for malware before it ships.
- It cannot be tampered with. The signature is a cryptographic seal over every file; change a single byte and macOS refuses to open it.
- It is provably from us. The signature is tied to our Apple Developer identity, so no one else can ship something your Mac accepts as CleanR.
- It just works. No Gatekeeper warnings, no right-click-to-open, no Terminal.
Put together with source available for inspection, this is a chain of trust you do not take on faith: you can inspect the code, Apex Studio LLC signs official releases, Apple verifies them, and your Mac re-checks the seal every time you open the app.
Do not take our word for it. Both the source and the running process are checkable.
1. Search the source for networking APIs
rg -n 'URLSession|NSURLConnection' Sources --glob '*.swift'You should only ever see two network paths, both optional and both read-only:
Sources/CleanRKit/UpdateChecker.swift: the optional CleanR update check (turn it off in Settings)Sources/CleanR/Modules/Updater/UpdaterModule.swift: the user-driven check of other apps' Sparkle feeds when you open the Updater
There is no analytics, crash reporter, or tracker SDK anywhere in the codebase.
2. Watch the live process
lsof -i -P -n | grep -i 'CleanR\|CleanR\|CleanR' || echo "no network sockets"Expected: no established connections while you are only cleaning locally. Little Snitch or LuLu make the same check visual.
3. Inspect the binary you actually installed
The source and the signed binary are different artifacts, so the strongest check runs against the app on your disk, not this repo. After brew install --cask cleanr:
APP="/Applications/CleanR.app/Contents/MacOS/CleanR"
# Networking classes the binary imports (only URLSession appears):
nm -u "$APP" | grep -iE 'URLSession|NWConnection|CFSocket' | sort -u
# Every URL compiled into the binary (only the two update endpoints are fetched):
strings -a "$APP" | grep -iE 'https?://' | sort -uExpected: the only networking class is _OBJC_CLASS_$_NSURLSession, and the only fetch endpoints are api.github.com/repos/coldrazer/CleanR/releases/latest and formulae.brew.sh/api/cask/cleanr.json. The other github.com/coldrazer/CleanR links and the buymeacoffee.com/cleanus support link just open in your browser. No trackers, no analytics hosts, nothing else. Re-run it after any update; it always describes the exact build you are running.
Note: on a non-sandboxed Developer ID app like this one, network access is not gated by an entitlement, so this symbol and string inspection, not codesign --entitlements, is the real check. The same guard runs in CI on every change (scripts/check-network-surface.sh).
CleanR
├── CleanR Main SwiftUI app (22 modules)
├── CleanRKit Shared framework (models, constants, protocols)
├── CleanRHelper XPC privileged helper (LaunchDaemon for root ops)
└── CleanRMenu Menu-bar monitor (independent process)
| Layer | Technology |
|---|---|
| Language | Swift 6 with strict concurrency |
| UI | SwiftUI + AppKit hybrid |
| Concurrency | Actors, TaskGroup, async/await, @Sendable |
| Database | GRDB.swift (SQLite) with WAL mode |
| File scanning | URLResourceKey prefetching on APFS |
| Incremental updates | FSEvents with historical replay |
| Privileged ops | SMAppService + NSXPCConnection |
| System stats | Mach APIs (host_processor_info, vm_statistics64, proc_pidinfo) |
CleanR is designed to never cause data loss:
- Protected-paths blocklist:
/System,/usr,/bin,/sbin, and Apple system apps are untouchable, with macOS firmlinks canonicalized so symlink-redirect detection does not false-positive on legitimate system paths - Pre-scan cleanability filter: items the current process could not trash (root-owned children of system caches, data-vaulted
~/Library/Caches/com.apple.*dirs) are dropped at scan time so they never appear as cleanable - Trash-first deletion: every removal goes to the Trash by default, and a dry-run mode previews without touching anything
- TOCTOU prevention: symlinks are re-resolved immediately before deletion
- Excluded Folders: pick folders in Settings that scans skip entirely, and
SafetyGuardadditionally refuses to delete anything under them - Chunked, cancellable cleanup: large selections split into 5k-item chunks honoring cancellation between chunks, and scans return to idle within about a second when you hit Cancel
- In-app activity log: every error during a clean is logged with its full path, viewable and copyable from the post-clean screen, auto-pruned after 30 days
- Kernel-enforced XPC gate: the privileged helper uses
NSXPCListener.setCodeSigningRequirementso the kernel itself rejects any connection whose code signature does not match the app's identifier and team
swift testThe XCTest suite has 715 tests and treats SafetyGuard and CleaningEngine (the death-and-life files) as must-be-perfect: adversarial coverage of symlinks, path traversal, NULL bytes, SIP, protected apps, file-count caps, TOCTOU, and idempotence, plus integration coverage of dry-run / trash / permanent cleaning, the scan state machine, every System Junk category, the treemap math, the uninstaller matching engine, duplicate detection, appcast parsing, and full end-to-end fixture-to-clean cycles. Fixtures (withTempHome, withFakeApp, withFakePlist) keep every test off your real home directory.
CleanR is open source software created by Apex Studio LLC and licensed under Apache 2.0. Contributions are welcome: fork the repository, make your change, and open a pull request. By submitting a contribution, you agree that it may be included in CleanR under the terms stated in LICENSE.
Apache 2.0
CleanR was created by Apex Studio LLC and is licensed under the Apache License, Version 2.0. See LICENSE. You may use, modify, and distribute CleanR under the terms of that license.
Third-party components remain under their own licenses. See NOTICE.md and the license texts in LICENSES/.
Inspired by the open-source Mac utility community:
- Pearcleaner: app uninstaller patterns
- Mole: cleanup categories
- Tencent Lemon Cleaner: modular architecture
- Squarified Treemap algorithm by Bruls, Huizing, and van Wijk (2000)
CleanR is free and stays free: no paid tier, no ads, no tracking. If it saved you from a cleaner subscription, you can buy me a coffee ☕. It keeps the releases signed, notarized, and coming.
CleanR has one sponsor slot, shown right here. Around 9,000 people visit this repository every month, and the app has been downloaded more than 76,000 times, mostly by developers and Mac power users.
- One sponsor at a time, so your name is not lost in a wall of logos.
- Vetted. Developer tools, privacy and security products, and Mac apps that respect their users. No cleaners or "optimizers", no crypto, no affiliate VPN deals, nothing that tracks people.
- Never inside the app. CleanR has no ads and no telemetry, and no sponsor changes that.
This spot is open. Become the sponsor →
CleanR is free software built by the community, for the community.
If it saved you from a subscription, a ⭐ helps others find it, and a coffee ☕ keeps it going.



