MacOS Maid respects your privacy:
- No network calls: MacOS Maid never makes network connections or sends telemetry
- No data collection: All operations are performed locally on your machine
- No external dependencies: Only uses system utilities and Python standard library (plus click, pyyaml, rich for CLI)
MacOS Maid follows the principle of least privilege:
Most operations run without elevated privileges. Modules that require sudo are:
wifi- Removing WiFi networks requires admin privilegesnetwork- DNS cache flush requires admin privilegessystem_cache- Cleaning system logs requires admin privilegesprivacy- Clearing recent items requires admin privileges
Privileged modules are disabled by default. To enable them, use the --sudo flag:
maid clean --sudo
maid audit --sudoWhen you use --sudo, you will be prompted for your password. MacOS Maid never stores or caches credentials.
| Module | Operation | Why Sudo? |
|---|---|---|
wifi |
Remove WiFi networks | macOS requires admin privileges to modify network settings |
network |
Flush DNS cache | dscacheutil -flushcache and restarting mDNSResponder require sudo |
system_cache |
Clean diagnostic logs | /Library/Logs/DiagnosticReports requires admin access |
privacy |
Clear recent items | Writing to system preferences requires elevated privileges |
All other modules operate on user-owned files and directories.
MacOS Maid ships with safe defaults:
First-time users automatically run in dry-run mode:
# First run without config - automatically dry-run
maid clean
# Generate config to enable real operations
maid init
maid cleanThe git module is disabled by default and requires explicit configuration:
git:
enabled: true
repos_dir: ~/Code
delete_merged: false # Even when enabled, deletion is opt-inThe wifi module always keeps the currently connected network, regardless of configuration. This is hardcoded and not configurable to prevent locking yourself out of your network.
The privacy module never deletes files from your Downloads folder. It only reports on old files in audit mode.
Several modules are read-only and never modify your system:
system_integrity- Checks SIP, FileVault, Gatekeeper, XProtect, Firewallapp_audit- Scans for unsigned applicationslaunch_audit- Lists non-Apple launch daemons and agentstools- Runs external security tools (Lynis, osquery, KnockKnock)
These modules have empty clean() implementations and only report findings via audit().
The original maid.sh performed several dangerous operations that have been permanently removed:
- ❌
/private/var/foldersdeletion - breaks system functionality - ❌
diskutil secureErase freespace- extremely slow and unnecessary on modern SSDs - ❌ Hardcoded SSID deletion - replaced with retention-based approach
- ❌
known_hostsfile deletion - removed for safety - ❌ Forced memory purge - removed as macOS handles memory automatically
We take security seriously. If you discover a security vulnerability in MacOS Maid, please report it via:
Use GitHub Security Advisories to privately report vulnerabilities.
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if you have one)
- We will acknowledge your report within 48 hours
- We will provide a detailed response within 7 days
- We will work with you to understand and fix the issue
- We will credit you in the security advisory (unless you prefer to remain anonymous)
When using MacOS Maid:
- Review the config: Run
maid initand review~/.maid.ymlbefore enabling real operations - Use dry-run first: Always run
maid clean --dry-runbefore real operations - Check the report: Review module actions in the terminal output
- Review logs: Check
~/.maid/last_run.jsonafter each run - Be cautious with sudo: Only use
--sudowhen you need privileged modules - Review Git config: Only enable the
gitmodule withdelete_merged: falseinitially - Check audit results: Run
maid audit --sudoto review security findings
- MacOS Maid is distributed via PyPI and Homebrew
- The Python package is built with modern packaging standards (PEP 517)
- Homebrew formula verifies checksums before installation
- No pre-compiled binaries - all code is source-distributed and installed via pip