-
Notifications
You must be signed in to change notification settings - Fork 1
Commands
CleanMyMac CLI can be used through the interactive menu or by running commands directly.
Both aliases launch the same tool:
cleanmymac
cmmThis documentation uses cleanmymac in all examples.
| Command | What it does |
|---|---|
cleanmymac |
Opens the interactive menu |
cleanmymac clean |
Scans all cleanup categories |
cleanmymac clean junk |
Scans system and Xcode-related junk |
cleanmymac clean dev |
Scans caches and files left by developer tools |
cleanmymac clean ai |
Scans junk created by AI tools |
cleanmymac clean trash |
Scans the system and mounted-volume Trash |
cleanmymac purge |
Finds removable artifacts in common project folders |
cleanmymac purge <path> |
Scans a specific folder for project artifacts |
cleanmymac analyze |
Explores disk usage |
cleanmymac analyze <path> |
Explores disk usage inside a specific folder |
cleanmymac optimize |
Frees RAM and releases purgeable disk space |
cleanmymac optimize ram |
Releases inactive memory |
cleanmymac optimize purgeable |
Releases purgeable disk space |
cleanmymac config |
Opens CLI preferences |
cleanmymac ignore list |
Shows protected paths |
cleanmymac ignore add <path> |
Adds a path to the ignore list |
cleanmymac ignore remove <path> |
Removes a path from the ignore list |
cleanmymac --help |
Shows available commands and options |
cleanmymac --version |
Shows the installed version |
Use clean for caches and other tool-generated files stored outside individual project folders.
Run all cleanup categories:
cleanmymac cleanOr scan one category:
cleanmymac clean junk
cleanmymac clean dev
cleanmymac clean ai
cleanmymac clean trashCleanMyMac CLI scans first and shows the detected items before anything is removed.
cleanmymac clean dev detects cached packages and build files left by tools such as:
- Homebrew
- npm, Yarn, and pnpm
- pip, Poetry, and uv
- Cargo and Go
- CocoaPods
- Docker
- VS Code and JetBrains
- Maven and Gradle
- Bun, Deno, and mise
Use purge for generated artifacts stored inside development projects, including dependencies, virtual environments, and build directories.
Scan common project folders:
cleanmymac purgeBy default, the command checks:
~/Projects
~/Code
~/dev
~/GitHub
~/Workspace
Scan a specific location:
cleanmymac purge ~/WorkResults are grouped by project. Artifacts older than seven days are preselected, while newer artifacts remain visible but unchecked.
purgetargets generated artifacts, not project source code. Always review the selected paths before confirming.
Explore disk usage in your home directory:
cleanmymac analyzeStart from a specific folder:
cleanmymac analyze ~/ProjectsUse the arrow keys to navigate through folders and press O to reveal the selected item in Finder.
Browsing is read-only. Removing an item requires an explicit selection and confirmation.
Not sure where to begin? Start with
cleanmymac analyzeto understand what is consuming your storage.
Run all available optimization tasks:
cleanmymac optimizeOr run them separately:
cleanmymac optimize ram
cleanmymac optimize purgeable-
optimize ramreleases inactive memory -
optimize purgeableasks macOS to release disk space already marked as purgeable
These commands do not remove project source code or personal documents.
Add a file or folder to the ignore list:
cleanmymac ignore add ~/Projects/important-projectReview protected paths:
cleanmymac ignore listRemove a path from the ignore list:
cleanmymac ignore remove ~/Projects/important-projectIgnored paths remain excluded from clean, purge, and analyze until you remove them from the list.
Open CLI preferences:
cleanmymac configConfiguration changes persist between sessions.
Supported cleanup commands can be run with --force:
cleanmymac clean --force
cleanmymac purge --force
⚠️ --forceskips interactive confirmation and removes detected items immediately. Run the command without this option first and review what it finds.
View all commands and options:
cleanmymac --helpCheck the installed version:
cleanmymac --version