Find the files eating your SSD.
An interactive disk audit and cleanup panel, right inside Codex.
Install · What it finds · Cleanup controls · Changelog
Dependencies, build folders and model downloads can outlive the task that created them. Clean My Mac helps you find those leftovers, inspect the largest storage owners and review a cleanup plan on your Mac.
macOS · Codex with plugin support · Node.js · Python 3.12+
Run these commands in your terminal:
codex plugin marketplace add iddictive/clean-my-mac-plugin
codex plugin add clean-my-mac-app@clean-my-mac-localOpen a new Codex chat, then ask:
Open Clean My Mac and find what's taking up disk space. Check unused Codex build folders and downloaded models, and show me a cleanup plan before removing anything.
Codex opens the interactive panel. Scans and cleanup run locally.
Updating an existing installation
For a marketplace installed from this GitHub repository:
codex plugin marketplace upgrade clean-my-mac-local
codex plugin add clean-my-mac-app@clean-my-mac-localStart a new chat to load the updated tools.
| Looking for… | Open… |
|---|---|
| The biggest files and folders on your SSD | Deep scan — file sizes, allocated storage and actual volume free space. |
| Caches that can be regenerated | Cleanup plan — package, browser and developer caches, grouped for review. |
| Build folders and downloaded models left behind by Codex | Codex — select inactive artifacts with evidence that they can be recreated. |
| An app or cloud folder that keeps growing | Application Support / Cloud — inspect storage owners and sync status before choosing a remedy. |
APFS copies can share storage, so adding up folder sizes can overstate what deletion will free. The audit keeps logical size, allocated bytes and volume free space separate, and reports gaps in scan coverage.
For Codex artifacts, the flow is:
Scan → Select → Review plan → Confirm → Clean
The plugin checks the selected files again before deleting. Active use, changed contents or missing evidence block artifact removal. An empty selection never means “clean everything.”
Deletion is permanent. Removed downloads and builds must be recreated. The plugin runs approved cleanup; it does not install a background sweeper or impose storage quotas.
What qualifies for Codex cleanup?
- Ignored Node dependency/build directories, Rust build output and Python environments with retained dependency files.
- Complete pretrained Hugging Face downloads pinned to a repository revision, with matching download metadata.
A large folder or a .safetensors extension alone does not qualify. Original inputs, editable sources, trained checkpoints, delivered outputs, Git history, Codex history, credentials and runtime state are preserved. Checks inspect selected task workspaces, not Codex's operating data.
Planning and deletion revalidate provenance, active processes and tree identity. Symlink roots, nested mounts, cloud placeholders and incomplete evidence prevent artifact deletion. Ordinary cache cleanup has its own reviewed category plan; Docker data, simulator devices, Trash and app resets require an explicit category choice.
Allocated-byte totals are estimates. Check volume free space after cleanup for the actual change.
The plugin uses a standard-library Python engine and a dependency-free Node.js MCP server. The interactive panel and CLI share the same artifact classifier.
Run the command-line tools
Requires Node.js and Python 3.12+ on PATH.
From a source checkout:
git clone https://github.com/iddictive/clean-my-mac-plugin.git
cd clean-my-mac-plugin
python3 plugins/clean-my-mac-app/skills/clean-my-mac/scripts/clean_my_mac.py --helpRead-only examples:
python3 plugins/clean-my-mac-app/skills/clean-my-mac/scripts/clean_my_mac.py tool-status
python3 plugins/clean-my-mac-app/skills/clean-my-mac/scripts/clean_my_mac.py deep-scan --path /System/Volumes/Data --json
python3 plugins/clean-my-mac-app/skills/clean-my-mac/scripts/clean_my_mac.py codex-scan --root /absolute/path/to/task --jsonUse an eligible ID returned by that scan, keeping the same root:
python3 plugins/clean-my-mac-app/skills/clean-my-mac/scripts/clean_my_mac.py codex-plan --root /absolute/path/to/task --id SCANNED_ID --json
python3 plugins/clean-my-mac-app/skills/clean-my-mac/scripts/clean_my_mac.py codex-clean --root /absolute/path/to/task --id PLANNED_ID --yes --jsonSCANNED_ID, PLANNED_ID, and the task path are placeholders. IDs are selection evidence, not authorization to bypass a rejected path. The default artifact budget is 60 seconds and 500,000 entries; narrow the root when coverage is incomplete. CLI limits can increase to 120 seconds and 1,000,000 entries.
Optional gdu and dust adapters add independent scan evidence. Missing tools are reported; the plugin does not install them.
Source layout and checks
The plugin lives in plugins/clean-my-mac-app. Its Python engine owns cleanup policy, mcp/server.mjs exposes the MCP tools, and mcp/clean-my-mac-app.html owns the panel. MCP and CLI use the same artifact classifier.
python3 -m unittest discover -s plugins/clean-my-mac-app/tests -vThe suite covers scanner accounting, partial/unavailable adapters, MCP protocol, selection validation, activity protection, and cleanup safety. No model download or large build is needed to run it.
This is an independent Codex plugin and is not affiliated with MacPaw's CleanMyMac.