Mac Sai: an open-source Mac cleaner that keeps its deletions reversible
Mac Sai: the open-source Mac cleaner, optimizer, and malware scanner. A free, Apple-notarized alternative to CleanMyMac, built with Swift 6 and SwiftUI.
At a glance
- What is it?
- Mac Sai is a BSD-3-Clause SwiftUI utility that bundles 17 cleanup, protection and disk-insight modules behind a trash-first deletion model. The interesting part is not the feature list, it is the SafetyGuard that sits in front of every path.
- Who is it for?
- Mac Sai is worth adopting if you want CleanMyMac-style modules without a subscription and you are willing to read the SafetyGuard and protected-paths code before letting it touch a machine you care about. Do not adopt it as your only malware defence: the README describes signature-based scanning over a curated list and explicitly says it is not an antivirus.
- Can I use it commercially?
- Yes. BSD-3-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Swift, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 17, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The problem Mac Sai targets: subscription cleaners with opaque deletion logic
Commercial Mac cleaners ask for a yearly fee and deep file access at the same time. You cannot audit what they delete, and you cannot fork them when a scan removes something you wanted. Mac Sai's pitch is that the whole toolkit should be readable: BSD-3-Clause, no subscription, no in-app purchases, no nag screens. The README states there is no analytics, no crash reporter and no trackers, and points readers at a section titled "Verify no telemetry yourself" rather than asking for trust.
The intended audience is narrower than "every Mac user". It is for people who already know what a launch agent is, who have opinions about Spotlight reindexing, and who would rather read a SafetyGuard implementation than a EULA. If you want a cleaner that decides everything for you and never shows a path, this is the wrong shape of tool. Every module here exposes what it found before it acts, which is more work for the user, not less.
How Mac Sai works: modules, a SafetyGuard, and Trash-first deletion
The application is a SwiftUI app on Swift 6, targeting macOS 14 and later. The repository layout is conventional for a Swift package: Sources/, Tests/, Resources/, Package.swift, plus a Casks/ directory holding the Homebrew cask definition. The README claims 862 passing tests, and Tests/ is present in the top-level listing, so the claim is at least checkable rather than asserted.
The functional unit is the module. Cleanup covers Smart Scan, System Junk, Mail Attachments and Trash Bins. Protection covers Malware Removal, Privacy, Saved Wi-Fi and a Permissions Overview. Performance covers login-item management and system maintenance tasks. Applications covers an Uninstaller, Extensions and an Updater. Files covers Space Lens, Large & Old Files, Duplicates and a Shredder. Smart Scan runs cleanup, protection and performance modules together and reports what each one freed.
Two mechanisms deserve attention because they define the tool's risk profile. The first is the deletion path: the README describes "Trash-first deletion, a protected-paths blocklist, symlink and TOCTOU guards, and a SafetyGuard that validates every path". TOCTOU here means time-of-check-to-time-of-use, the window in which a path can be swapped for a symlink between validation and deletion. A cleaner that validates paths without guarding that window is a data-loss bug waiting to happen, so its presence is a meaningful design decision rather than marketing.
The second is Universal Binary thinning inside System Junk. The README says it finds fat Mach-O binaries carrying both arm64 and x86_64 and rewrites them to the native architecture via lipo, honoring Cancel. This is the one operation described that modifies executable files rather than caches or logs, and it is the operation most likely to break an app that still needs its x86_64 slice. Treat it as opt-in per binary, not as a routine cleanup step.
Installing Mac Sai with Homebrew and running a first Smart Scan
The README gives one install command as the primary path, with a notarized DMG as the alternative. The cask name is mac-sai, which is not identical to the repository name, so copy it exactly:
brew install --cask mac-saiAfter that, Mac Sai appears in /Applications like any other app. The README notes it is notarized by Apple, so Gatekeeper opens it without a right-click override or a Terminal workaround. That matters for a tool that requests broad file access, because the notarization signature is checked on every launch.
There is no CLI documented in the README. The interface is the SwiftUI app plus a menu-bar widget showing live CPU, memory, disk and battery figures, network, uptime and swap. A first real use is Smart Scan, which the README describes as one click running cleanup, protection and performance modules together with live progress, then reporting what was freed per module. Nothing is deleted during the scan itself; the results are a review surface.
If you prefer to read before you run, the repository is a Swift package:
git clone https://github.com/iliyami/MacSai.git
cd MacSai
swift buildThe README does not document a swift run target or a command-line entry point, so building from source is for inspection and for running the test suite, not for producing a headless cleaner. The Casks/ directory in the repository is where the Homebrew cask definition lives, which is the file to read if you want to confirm what brew install --cask mac-sai actually pulls down.
Where Mac Sai is the wrong tool
The malware module is signature-based over a curated list, and the README says so plainly: "not an antivirus, and it says so". Three scan depths (Quick, Balanced, Deep) cover launch agents and daemons, browser extensions and known adware patterns. That is a useful sweep for consumer adware. It is not behavioural analysis, it is not a threat-intelligence feed, and it will not catch a targeted implant. If a machine is suspected of a real compromise, this module is a first pass, not the answer.
The Permissions Overview is read-only by design. It shows which privacy (TCC) grants each app holds, a view System Settings does not offer, but every action deep-links back to System Settings, which owns the toggles. Anyone expecting to revoke permissions from inside Mac Sai will be disappointed, and that is a deliberate boundary rather than a missing feature.
Maintenance tasks carry the same caveat as any system-task runner. Rebuilding Launch Services, reindexing Spotlight, flushing DNS and thinning Time Machine snapshots are legitimate operations with visible side effects: Spotlight search is degraded until the index rebuilds, and thinning snapshots reduces restore points. The README tags tasks by severity and offers "Run Safe Tasks" sequentially, with the admin password asked once. The severity tagging is the only guidance the README provides; it does not document per-task rollback, so treat the higher-severity tasks as one-way operations until you have read the source.
Mac Sai against Pearcleaner and the single-purpose uninstallers
The related searches around this project point at Pearcleaner, and the comparison is genuinely useful because the two tools differ in scope rather than in quality. Pearcleaner is an uninstaller: it finds an app and the files associated with it, and that is the job. Mac Sai's Uninstaller is one of 17 modules, sitting alongside disk treemaps, duplicate detection, a malware scanner and system maintenance tasks.
The practical difference is what you install and what you maintain. A single-purpose uninstaller has a small surface and a small failure mode: worst case, it misses a preference file. A 17-module utility has a much larger surface, which is exactly why Mac Sai's SafetyGuard, protected-paths blocklist and Trash-first deletion exist. If you only ever want to remove apps cleanly, the narrower tool is the lower-risk choice. If you want one app for cleanup, uninstall, duplicate consolidation and disk insight, the breadth is the reason to accept the larger audit burden.
On the uninstaller itself, the README describes a pattern-matching engine that searches 17+ Library subdirectories, including apps nested in vendor subfolders, and supports Reset to Defaults, which wipes an app's caches and preferences while keeping the app installed. That last mode is the one commercial uninstallers often omit, and it is the safer default for troubleshooting a misbehaving app.
Maintenance, releases and what the BSD-3-Clause licence means here
The last push to the default branch was on 2026-09-17, and v1.20.0 was released the same day, with v1.19.0 on 2026-09-03 and v1.18.8 on 2026-08-08. That is a roughly two-week release cadence across the visible window, and the repository is not archived. For a desktop utility distributed outside the App Store, that cadence is the thing to watch: macOS point releases break cleaners in specific, boring ways, usually by moving a cache directory or tightening a privacy gate.
Upgrade cost is low on the Homebrew path. brew install --cask mac-sai is the documented install, and the cask is versioned, so brew upgrade picks up new releases. The DMG path is manual. There is no documented migration step between versions and no documented rollback procedure, which is worth noting for anyone pinning a specific version on a fleet.
The licence is BSD-3-Clause. That permits commercial use, modification and redistribution provided the copyright notice and licence text are retained, and it includes a clause preventing the use of the copyright holder's name to endorse derivatives. For an internal fork, that is permissive. It is not a legal opinion, and if you plan to redistribute a modified build, read LICENSE in the repository rather than this paragraph. The README's own framing, "free, forever", is a project statement, not a licence term.
Duplicates and Consolidate: the APFS-specific behaviour to understand
The Duplicates module runs progressive detection: size grouping first, then partial SHA-256, then full hash, then inode verification. That ordering is the standard way to avoid hashing every file on a large volume, and the inode check at the end is what prevents hard-linked files from being reported as duplicates that can be deleted.
The part that needs care is Consolidate. The README describes it as a mode that reclaims space with APFS copy-on-write clones without deleting the files. Copy-on-write cloning means the duplicate is replaced by a clone sharing the same physical blocks until one copy is modified. On APFS this is cheap and reversible in the sense that both paths still exist and still open normally. It is not reversible in the sense of restoring two independent physical copies without rewriting data.
That makes Consolidate a better default than deletion for anyone nervous about removing files, but only on APFS volumes. The README does not describe behaviour on non-APFS external drives, and the Trash Bins module explicitly covers external drives, so the two modules have different volume assumptions. If your duplicates live on an external HFS+ or exFAT disk, do not assume Consolidate behaves the same way; the documentation is silent on it.
Editorial conclusion
Mac Sai is worth adopting if you want CleanMyMac-style modules without a subscription and you are willing to read the SafetyGuard and protected-paths code before letting it touch a machine you care about. Do not adopt it as your only malware defence: the README describes signature-based scanning over a curated list and explicitly says it is not an antivirus. Before running it on a work machine, verify three things in the repository: which paths the protected-paths blocklist covers, whether Trash-first deletion is enforced for every module you plan to use, and whether the Universal Binary thinning step rewrites binaries in place. The last one is the only operation in the README that modifies executables rather than caches, so it deserves the most scrutiny.
Frequently asked questions
How do I install Mac Sai on macOS?
The README gives one command, brew install --cask mac-sai, and notes the cask name differs from the repository name. The alternative is the notarized DMG from the latest release, which opens without a Gatekeeper override. Mac Sai requires macOS 14 or later.
Is Mac Sai a replacement for antivirus software?
No. The Malware Removal module is signature-based over a curated list, scanning launch agents and daemons, browser extensions and known adware patterns at three depths. The README states directly that it is not an antivirus.
Does Mac Sai send any data about my Mac?
The README states there is no telemetry: no analytics, no crash reporter, no trackers, no server to phone home to. It also points to a section titled Verify no telemetry yourself rather than asking readers to take the claim on trust.
Community notes