Open-source Mac cleaner, optimizer, uninstaller and malware scanner.
Open-source alternatief voor CleanMyMac
Open-source Mac cleaner, optimizer, uninstaller and malware scanner. Apple-notarized, no subscription.
READMEiliyami/MacSai op GitHub
brew install --cask mac-sai
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.| 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, Universal Clipboard archives (listed for review, never pre-selected), 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, English, 简体中文, 繁體中文, Русский, Deutsch, Français, Español, Italiano, Português (Brasil), Türkçe, 日本語, 한국어, or فارسی in Settings → Interface Language. English, Simplified Chinese, and Russian cover the whole interface. The other languages 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. Farsi uses a right-to-left layout.
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.
One-line installer
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 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|Sparkle|SecTrustEvaluate' Sources --glob '*.swift'
The optional network paths are disclosed below. Local cleaning does not upload scan results or file lists:
Sources/MacClean/Services/SelfUpdateController.swift: Sparkle checks the HTTPS feed sealed into the signed app and downloads signed release notes and update archives. Automatic checks and automatic download/install are separate settings; system profiling and release-note JavaScript are disabled. See update setup. For configured direct installations, automatic update checks are on by default and run once a day; each request includes the app and Sparkle versions in the User-Agent, and checks can be turned off in Settings.Sources/MacCleanKit/UpdateChecker.swift: Homebrew update checks and the release-page fallback for builds without a configured signed feedSources/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
(
MACSAI_APP=$(cd "/Applications/Mac Sai.app" && pwd -P) || exit 1
MACSAI_PIDS=$(ps -ww -axo pid=,comm= | awk -v bundle="$MACSAI_APP/" '
{ pid=$1; sub(/^[[:space:]]*[0-9]+[[:space:]]+/, "")
if (index($0, bundle) == 1) print pid }' | paste -sd, -)
if [ -n "$MACSAI_PIDS" ]; then
ps -p "$MACSAI_PIDS" -o pid=,comm=
lsof -nP -a -p "$MACSAI_PIDS" -i
else
echo "No running executables from this Mac Sai bundle"
fi
)
This snapshot selects PIDs by executable paths inside the chosen app bundle, so unrelated Installer/Updater processes are excluded. Sparkle helpers copied elsewhere and macOS trust services are outside this snapshot; use a process-aware firewall to observe those. Run it while checking or downloading an update to catch short-lived connections.
With update checks/downloads and optional malware verification inactive, local cleaning opens no network connection. Include Sparkle’s child processes when observing an update; Apple certificate checks run through macOS trust services. Little Snitch or LuLu can show these connections too.
3. Inspect the binary you actually installed
For a DMG or Homebrew installation, this loop needs only macOS command-line tools, with no source checkout or Python. It reads all seven bundled binaries and lists common network imports, static URLs and tracker strings for manual inspection:
(
MACSAI_APP="/Applications/Mac Sai.app"
MACSAI_SPARKLE="$MACSAI_APP/Contents/Frameworks/Sparkle.framework/Versions/B"
for MACSAI_BINARY in \
"$MACSAI_APP/Contents/MacOS/MacClean" \
"$MACSAI_APP/Contents/Library/LoginItems/MacCleanMenu.app/Contents/MacOS/MacCleanMenu" \
"$MACSAI_SPARKLE/Sparkle" "$MACSAI_SPARKLE/Autoupdate" \
"$MACSAI_SPARKLE/Updater.app/Contents/MacOS/Updater" \
"$MACSAI_SPARKLE/XPCServices/Downloader.xpc/Contents/MacOS/Downloader" \
"$MACSAI_SPARKLE/XPCServices/Installer.xpc/Contents/MacOS/Installer"
do
printf '\n%s\n' "$MACSAI_BINARY"
MACSAI_IMPORTS=$(nm -uj "$MACSAI_BINARY") || exit 1
printf '%s\n' "$MACSAI_IMPORTS" | grep -Ei \
'URLSession|URLConnection|CFNetwork|Network|nw_|DNSService|NetService|curl_|^_(socket|connect|connectx|send|recv)([$]|$)' || true
MACSAI_STRINGS=$(strings -a "$MACSAI_BINARY") || exit 1
printf '%s\n' "$MACSAI_STRINGS" | grep -Ei \
'://|sentry|firebase|mixpanel|amplitude|bugsnag|crashlytics|posthog|appsflyer' || true
done
)
These listings are not a pass/fail audit or proof that every runtime destination is visible. For the complete component inventory, explicit allowlists and bundled privacy settings, use the automated check below.
Run the check from a source checkout matching the installed version. It inspects the actual app bundle, including the main executable, menu helper, Sparkle.framework, Autoupdate, Updater.app, Downloader.xpc, and Installer.xpc:
bash scripts/check-network-surface.sh "/Applications/Mac Sai.app"
Expected: seven Mach-O files pass. Missing or unexpected binaries, unlisted network imports or static URLs, and tracker markers fail the check. URLSession imports are allowed in Mac Sai, its menu helper, Sparkle, and Downloader; the other Sparkle helpers have no allowed network imports. Sparkle’s documentation links and XML namespace are explicitly identified, not treated as download endpoints.
The script also prints the bundled SUFeedURL and verifies the signed-feed, pre-extraction, and privacy settings. Check that feed’s archive/release-note destinations and the other-app feeds you request against the live connections above. The fallback endpoints are api.github.com/repos/iliyami/MacSai/releases/latest and formulae.brew.sh/api/cask/mac-sai.json; the opt-in malware endpoint is mb-api.abuse.ch/api/v1/. Project/support links and browser-settings links open only when requested. The same complete-bundle check runs during packaging; CI checks both built executables and all five pinned Sparkle binaries. Check implementation and explicit allowlists.
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 ☕ or become a member. It keeps the releases signed, notarized, and coming.
Members get behind-the-scenes posts, an early look at each release, opt-in beta builds, and their name in the app. Nothing in the app is ever locked behind a membership.
Mac Sai has one sponsor slot, shown here and at the top of this page, in every language of this README.
Most visitors are developers and Mac power users, arriving mostly from Google search, then YouTube, GitHub and Reddit.
With official support for macOS.
Laatst bijgewerkt vanaf GitHub: 4 uur geleden
GitHub-cijfers worden een paar keer per dag ververst.
Elk open-source alternatief voor CleanMyMac dat hier staat, naast elkaar. Klik op een kolom om te sorteren.
Log in of maak een account aan om te reageren.
Nog geen reacties. Wees de eerste.
Laat het zien: een live kaart met je positie en beoordeling, die zichzelf bijwerkt.
Liever de kleine? Voeg toe: ?style=flat