A free, open-source macOS disk cleaning app built with Swift and SwiftUI. Scans your system for space-hogging files, shows a visual breakdown of disk usage, and lets you clean categories with one click.
No subscriptions. No ads. No telemetry.
- Disk Usage Overview — Donut chart showing used vs free space with color-coded health indicators
- 11 Scan Categories — System Caches, Application Logs, Trash, Xcode, iOS Backups, Docker, node_modules, Homebrew Cache, Mail Attachments, Large Files, and old Downloads
- File Inspector — Browse individual files per category, sorted by size, with select/deselect for granular control
- One-Click Cleaning — Clean individual categories or all safe categories at once
- Safe by Default — Files are moved to Trash (recoverable), system-critical paths are blocklisted, confirmation dialog before every delete
- Native macOS UI — Sidebar navigation, SF Symbols, Swift Charts, glassmorphism cards, dark mode support
Coming soon
- macOS 14.0 (Sonoma) or later
- Xcode 15+ (to build from source)
Grab the latest .app from Releases and drag it to your Applications folder.
Since the app is not notarized, you may need to right-click → Open → Open on first launch to bypass Gatekeeper.
git clone https://github.com/skshohagmiah/SweepMac.git
cd SweepMac
xcodebuild -project SweepMac.xcodeproj -scheme SweepMac -configuration Release buildOr open SweepMac.xcodeproj in Xcode and press Cmd+R.
SweepMac works best with Full Disk Access enabled. Without it, some categories (Mail Attachments, certain Library folders) won't be scannable.
To grant access:
- Open System Settings → Privacy & Security → Full Disk Access
- Click + and add SweepMac
- Restart the app
The app will guide you through this on first launch if access is missing.
| Category | Paths | Safe to Auto-Clean |
|---|---|---|
| System Caches | ~/Library/Caches/, /Library/Caches/ |
Yes |
| Application Logs | ~/Library/Logs/, /Library/Logs/ |
Yes |
| Trash | ~/.Trash/ |
Yes |
| Xcode | DerivedData, Archives, Device Support, Simulators | Yes |
| iOS Backups | ~/Library/Application Support/MobileSync/Backup/ |
Yes |
| Docker | ~/Library/Containers/com.docker.docker/ |
Yes |
| node_modules | Scans Projects, Developer, Documents, Desktop | Yes |
| Homebrew Cache | ~/Library/Caches/Homebrew/ |
Yes |
| Mail Attachments | ~/Library/Mail/ |
Manual review |
| Large Files | Files > 500 MB in home directory | Manual review |
| Downloads | Files older than 30 days in ~/Downloads/ |
Manual review |
SweepMac is designed to never cause harm:
- Blocklisted paths —
/System/,/usr/,/bin/,/sbin/,/Applications/and other critical paths are hardcoded as untouchable - Trash by default — Deleted files go to Trash so you can recover them. Permanent delete is opt-in via Settings
- Confirmation dialogs — Every clean action requires explicit user confirmation
- No root access — The app only operates within user-accessible directories
SweepMac/
├── SweepMac/
│ ├── SweepMacApp.swift # App entry point
│ ├── Models/
│ │ ├── DiskInfo.swift # Disk usage data model
│ │ ├── CleanCategory.swift # Category definitions and metadata
│ │ └── FileItem.swift # Individual file model
│ ├── ViewModels/
│ │ ├── DiskScannerVM.swift # Scan orchestration and state
│ │ ├── CleanerVM.swift # Cleaning logic and confirmation flow
│ │ └── SettingsVM.swift # User preferences with persistence
│ ├── Views/
│ │ ├── MainView.swift # NavigationSplitView layout
│ │ ├── OverviewView.swift # Disk chart + category cards grid
│ │ ├── DiskChartView.swift # Swift Charts donut chart
│ │ ├── CategoryDetailView.swift# File inspector with selection
│ │ ├── CleanConfirmSheet.swift # Confirmation dialog
│ │ ├── OnboardingView.swift # Full Disk Access setup guide
│ │ └── SettingsView.swift # Preferences panel
│ ├── Services/
│ │ ├── DiskScanner.swift # Async file system scanning
│ │ ├── Cleaner.swift # Safe file deletion
│ │ └── PermissionChecker.swift # Full Disk Access detection
│ └── Utils/
│ ├── ByteFormatter.swift # Human-readable file sizes
│ └── SafePathValidator.swift # System path blocklist
└── SweepMac.xcodeproj/
| Layer | Technology |
|---|---|
| Language | Swift 5.9+ |
| UI | SwiftUI |
| Charts | Swift Charts |
| File System | Foundation FileManager APIs |
| Architecture | MVVM |
| Concurrency | Swift Concurrency (async/await, actors) |
| Min Target | macOS 14.0 (Sonoma) |
Contributions are welcome! Here's how to get started:
- Fork the repo
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Build and test:
xcodebuild -scheme SweepMac build - Commit:
git commit -m "Add my feature" - Push:
git push origin feature/my-feature - Open a Pull Request
- App icon design
- Time Machine local snapshot cleanup
- Scheduled scans with notifications
- Menu bar widget for quick access
- Homebrew cask formula
- Sparkle auto-update integration
- Localization / multi-language support
MIT License. See LICENSE for details.