The open-source Mac cleaner, optimizer, and malware scanner.
A free, Apple-notarized alternative to CleanMyMac, built with Swift 6 and SwiftUI.
Downloaded 100,000+ times. Free forever, with zero telemetry.
English | 简体中文 | 繁體中文 | Deutsch | Français | Русский
Install in one command:
brew install --cask mac-sai
Or grab the latest DMG. It is notarized by Apple, so it just opens, no right-click, no warnings, no Terminal.
No ads in the app, ever. This page has one vetted sponsor slot, and it is open.
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. Mac Sai gives you the whole toolkit, in the open.
SafetyGuard that validates every path. It is built to never lose your data.| ### 🧹 Cleanup - **Smart Scan** (one click) - **System Junk** (16+ categories) - **Mail Attachments** - **Trash Bins** - **Project Junk** (build folders) - **Disk Hogs** (Docker, simulators) - **Clean History** (one-click Restore) | ### 🛡️ Protection - **Malware Removal** - **Privacy** (browsers) - **Browser Extensions** - **Saved Wi-Fi** - **Permissions Overview** | ### ⚡ Performance - **Optimization** (login items) - **Maintenance** (system tasks) |
| ### 📦 Applications - **Uninstaller** (+ Reset to Defaults) - **Unused Apps** - **Extensions** (panes, plug-ins) - **Updater** | ### 🗂️ Files - **Space Lens** (disk treemap) - **Large & Old Files** - **Duplicates** (+ Consolidate) - **Shredder** | ### 📊 Menu Bar - Live CPU / memory / disk / battery - Network, uptime, swap - Actionable recommendations |
| 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/MacClean/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, app bundles, browser extensions, and known adware/malware patterns. Exact-hash matching against Apple's XProtect signatures already on your Mac, offline, plus an optional MalwareBazaar (abuse.ch) hash feed. Safari extensions on Apple's blocklist and MalwareBazaar matches are listed for review, never pre-selected (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 |
A glassmorphism menu-bar widget that puts your Mac's vitals one click away. It is an independent process that launches at login and is toggled from the app's sidebar, so you never have to open the main window just to check in.
host_processor_info, vm_statistics64, APFS capacity, IOKit power source), color-graded green to amber to red--| 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 |
| Mac Sai | CleanMyMac | Pearcleaner | PureMac | OnyX | Mole | |
|---|---|---|---|---|---|---|
| Price | Free | $39.95/yr | Free | Free | Free | Free (CLI) |
| Open source | ✅ BSD-3 | ❌ | ✅ Fair-code | ✅ MIT | ❌ | ✅ MIT |
| Telemetry | ❌ None | ⚠️ Yes | ❌ 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. Mac Sai is for everyone who would rather have transparent source code and zero 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.
Mac Sai is in the official Homebrew cask, so no tap is needed:
brew install --cask mac-sai
It is notarized by Apple, so it launches from Spotlight or Applications with no warnings and no extra steps.
curl -fsSL https://raw.githubusercontent.com/iliyami/MacSai/main/scripts/install.sh | bash
Downloads the latest DMG and installs the app to `/Applications`.
**DMG download**
Grab the latest DMG from [Releases](https://github.com/iliyami/MacSai/releases/latest) and drag Mac Sai to your Applications folder.
**Build from source**
git clone https://github.com/iliyami/MacSai.git
cd MacSai
swift build
swift test # run the full 1,048-test suite
bash scripts/build-dmg.sh # build a local DMG (unsigned)
Requires the Swift 6 toolchain (Xcode 16+).
**Installed via the old tap?**
Mac Sai is in the official cask now, so you can drop the tap: `brew untap iliyami/macsai` (your installed app and future `brew upgrade` are unaffected).
A few modules (Mail Attachments, Privacy, Malware) need Full Disk Access to scan protected areas:
Homebrew install:
brew uninstall --zap --cask mac-sai
DMG or manual install (also handles a Homebrew install):
curl -fsSL https://raw.githubusercontent.com/iliyami/MacSai/main/scripts/uninstall.sh | bash
Both remove Mac Sai plus its preferences, caches, logs, and database under ~/Library.
Mac Sai 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:
Put together with a fully open source, this is a chain of trust you do not take on faith: the code is public, we sign every release, Apple verifies it, 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 three network paths, all optional and all read-only:
Sources/MacCleanKit/UpdateChecker.swift: the optional Mac Sai update check (turn it off in Settings)Sources/MacClean/Modules/Updater/UpdaterModule.swift: the user-driven check of other apps' Sparkle feeds when you open the UpdaterSources/MacCleanKit/MalwareBazaarFeed.swift: the opt-in MalwareBazaar hash download. It only runs when you add your own abuse.ch Auth-Key and press Update Now in Settings > Malware Databases. Each request sends only your Auth-Key and the query, never file hashes or paths. When a downloaded hash matches a signed file, macOS asks Apple whether its signing certificate was revoked, the same check Gatekeeper makes; that request is about the certificate, not your filesThere is no analytics, crash reporter, or tracker SDK anywhere in the codebase.
2. Watch the live process
lsof -i -P -n | grep -i 'MacClean\|Mac Sai\|MacSai' || 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 mac-sai:
APP="/Applications/Mac Sai.app/Contents/MacOS/MacClean"
# 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 three disclosed endpoints are fetched):
strings -a "$APP" | grep -iE 'https?://' | sort -u
Expected: the only networking class is _OBJC_CLASS_$_NSURLSession, and the only fetch endpoints are api.github.com/repos/iliyami/MacSai/releases/latest, formulae.brew.sh/api/cask/mac-sai.json, and mb-api.abuse.ch/api/v1/ (contacted only after you add a MalwareBazaar key and press Update Now). The other github.com/iliyami/MacSai links, the auth.abuse.ch sign-up link, and the buymeacoffee.com/iliyami 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).
Mac Sai
├── MacClean Main SwiftUI app (22 modules)
├── MacCleanKit Shared framework (models, constants, protocols)
├── MacCleanHelper XPC privileged helper (LaunchDaemon for root ops)
└── MacCleanMenu 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) |
Mac Sai is designed to never cause data loss:
/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~/Library/Caches/com.apple.* dirs) are dropped at scan time so they never appear as cleanableSafetyGuard additionally refuses to delete anything under themNSXPCListener.setCodeSigningRequirement so the kernel itself rejects any connection whose code signature does not match the app's identifier and teamswift test
The XCTest suite has 1,048 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.
Contributions are very welcome. Read the Contributing Guidelines, then:
swift testThere is also an open feature vote: 👍 the tools you want built next.
BSD 3-Clause. See LICENSE. You may use, modify, and redistribute the code, provided you keep the copyright and license text and do not use the "Mac Sai" name or contributors' names to endorse derived products without permission.
Inspired by the open-source Mac utility community:
Mac Sai 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.
Mac Sai has one sponsor slot, shown here and at the top of this page, in every language of this README.
100,000+downloads |
2,000+GitHub stars |
17,000page views a month |
6README languages |
Most visitors are developers and Mac power users, arriving mostly from Google search, then YouTube, GitHub and Reddit.
This spot is open. Become the sponsor →
Audience details and how to apply: SPONSORS.md
Mac Sai 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.
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|