{"data":{"slug":"discovered-6f6ab8ec9b39d12408945047d2ba091d5a9787a4cafe6161","title":"Free Up Space Mac","summary":"Free up space on a Mac safely by clearing caches, listing large files, and reviewing old AI models. The process measures free space, deletes safe caches, lists files for review, and reports the amount of space freed.","url":"https:\/\/skillshunter.net\/skills\/discovered-6f6ab8ec9b39d12408945047d2ba091d5a9787a4cafe6161","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-6f6ab8ec9b39d12408945047d2ba091d5a9787a4cafe6161","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-6f6ab8ec9b39d12408945047d2ba091d5a9787a4cafe6161.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-6f6ab8ec9b39d12408945047d2ba091d5a9787a4cafe6161\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running the cleanup, ensure no apps are actively using caches (e.g., Chrome, Xcode, or AI agents). Check for running processes using `ps -axo pid,etime,comm` and close any apps that may be writing to caches. Also, ensure the user has reviewed and confirmed the deletion of files in the 'Review' list before proceeding.","instructions":"---\nname: free-up-space-mac\ndescription: Free up space on a Mac safely. Weekly disk cleanup that measures free space, clears caches that rebuild themselves (browser, npm, yarn, pip, Homebrew, Xcode), lists large files and old AI models for review, and reports GB freed. Use when the user says \"free up space\", \"clean up my Mac\", \"Mac storage full\", \"System Data is huge\", \"disk is full\", or runs \/free-up-space-mac.\n---\n\n# Free up space on Mac\n\nA weekly cleanup. Delete the **safe** list without asking. For everything in **Review**, show sizes and wait for the user to pick. Never touch **Keep**.\n\n## 1. Measure\n\n```bash\ndf -h \/System\/Volumes\/Data | tail -1\ndu -sh ~\/* ~\/.[!.]* 2>\/dev\/null | sort -rh | head -20\n```\n\nNote the \"Avail\" figure, so you can report how much was freed at the end.\n\n## 2. Check what's running\n\nSome caches belong to apps that may be open. Check first:\n\n```bash\nps -axo pid,etime,comm | grep -i -E \"codex|claude|Chrome|Brave|Edge|Arc|Spotify|Xcode|node|npm|python\" | grep -v grep\n```\n\n- Browser caches can be cleared while the browser is open. The browser rebuilds them.\n- If an AI coding agent (Codex, Claude Code) is running a job, skip its data folders this time, or wait until it exits. Deleting its database mid-run can crash the job.\n- If `npm`, `yarn` or Xcode is building, skip its cache.\n\n## 3. Safe list: delete without asking\n\nThese rebuild themselves. Delete only the ones that exist. Use full paths, not `cd` followed by a relative glob.\n\n| Cache | Path |\n|---|---|\n| Chrome | `~\/Library\/Caches\/Google\/Chrome` |\n| Brave | `~\/Library\/Caches\/BraveSoftware`, `~\/Library\/Caches\/com.brave.Browser` |\n| Edge | `~\/Library\/Caches\/Microsoft Edge` |\n| Arc | `~\/Library\/Caches\/Arc` |\n| Spotify | `~\/Library\/Caches\/com.spotify.client` |\n| Homebrew | `~\/Library\/Caches\/Homebrew` (or run `brew cleanup --prune=all`) |\n| pip | `~\/Library\/Caches\/pip` |\n| npm | `~\/.npm\/_cacache`, `~\/.npm\/_npx`, `~\/.npm\/_logs` |\n| Yarn | `~\/.yarn\/berry`, `~\/Library\/Caches\/Yarn` |\n| pnpm | `~\/Library\/pnpm\/store` (or run `pnpm store prune`) |\n| uv | `~\/.cache\/uv` |\n| Xcode | `~\/Library\/Developer\/Xcode\/DerivedData` |\n| Codex runtime downloads | `~\/.cache\/codex-runtimes`, `~\/.codex\/cache` |\n\n\"Directory not empty\" errors mean the app is writing while you delete. They're harmless.\n\nThen also delete these:\n- **Web project build folders.** Delete `node_modules`, `.next`, `dist` and `.turbo` only in projects not edited in the last 14 days. `npm install` and `npm run build` bring them back. To find them:\n  ```bash\n  find ~\/Desktop ~\/Documents ~\/code ~\/Projects -maxdepth 4 -type d \\( -name node_modules -o -name .next -o -name .turbo \\) -prune -mtime +14 -exec du -sh {} + 2>\/dev\/null\n  ```\n- **Leftover Claude Code chat folders.** Delete a folder under `~\/.claude\/projects\/` when the project it belongs to no longer exists. Read the `cwd` field in one of its `.jsonl` files and check whether that path still exists. Skip any folder whose newest file changed in the last day. **Never delete a `memory\/` subfolder.** It holds the user's saved memories. Delete everything else in the folder and leave `memory\/` in place.\n\n## 4. Review list: show sizes, then ask\n\nMeasure each one, then list it with its size and what deleting it costs. Delete only what the user picks.\n\n```bash\ndu -sh ~\/Desktop\/*\/ ~\/Documents\/*\/ ~\/Downloads ~\/.cache\/* ~\/.codex\/* \"$HOME\/Library\/Application Support\"\/* 2>\/dev\/null | sort -rh | head -30\nfind ~ -type f -size +500M -not -path \"*\/Library\/Application Support\/Claude\/vm_bundles\/*\" -exec du -sh {} + 2>\/dev\/null | sort -rh | head -20\n```\n\n- **Big video and render files** (`.mp4`, `.mov`, `.prores`, PNG frame sequences) in finished projects. Read the project's README or notes first, so the final export, and any master needed for re-editing, are kept.\n- **Downloads** older than 60 days, especially `.dmg`, `.zip` and `.pkg` installers.\n- **AI models** in `~\/.cache\/huggingface\/hub`, `~\/.ollama\/models` and `~\/.cache\/whisper`. Before offering one, grep the user's projects for its name and say which script uses it.\n- **AI agent history:** for example `~\/.codex\/thread_history_*.sqlite`, `~\/.codex\/generated_images`, `~\/.codex\/sessions`.\n- **Large Claude Code chats** older than 30 days. List the 15 largest with size, age, project and first prompt. Never offer one changed in the last day, since it may be a session that's still running.\n- **App data for apps no longer used:** large folders in `~\/Library\/Application Support` and `~\/Library\/Containers`. Deleting one resets that app.\n- **iOS device backups** in `~\/Library\/Application Support\/MobileSync\/Backup`, and old **iOS simulators** (`xcrun simctl delete unavailable`).\n- **Docker:** `docker system df`, then `docker system prune` if the user agrees.\n- The **Trash**, if it's over 1 GB.\n\n## 5. Keep: never delete\n\n- `~\/.ssh`, `~\/.gnupg`, `~\/.config`, `~\/.aws`, `~\/.kube` (keys, credentials and settings)\n- `~\/.claude\/skills`, `~\/.claude\/plugins`, `~\/.claude\/CLAUDE.md`, and every `memory\/` folder under `~\/.claude\/projects\/`\n- `~\/Library\/Application Support\/Claude\/vm_bundles` (the sandbox Claude needs; a large re-download)\n- Python virtual environments (`.venv`, `~\/.venvs`) unless the user names one\n- Anything tracked in git\n- Final exports and masters unless the user names them\n- Anything under `\/System` or `\/Library`. Stay inside the home folder.\n\n## 6. Report\n\nRun `df -h` again. Then report:\n- Free space before and after\n- A short table of what was deleted\n- The Review list with sizes, so the user can pick\n","use_cases":["Free up space on a Mac when storage is low","Clean up caches that rebuild themselves (e.g., Chrome, npm, Xcode)","List large files and old AI models for review and deletion","Run a weekly disk cleanup to maintain system performance"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/s77sh\/free-up-space-on-mac\/blob\/80c258f935963e64f59caa96908409019adcbf3a\/skills\/free-up-space-mac\/SKILL.md","source_commit":"80c258f935963e64f59caa96908409019adcbf3a","license":null,"version":null,"listing_approved_at":"2026-11-30","created_at":"2026-11-29T11:03:57.000000Z","updated_at":"2026-11-30T06:51:59.000000Z","seo_title":"Free Up Space on Mac - Safe Disk Cleanup Tool","seo_description":"A weekly Mac disk cleanup tool that safely deletes caches, lists large files, and reviews old AI models to free up space. Use when your Mac storage is full or system data","seo_keywords":["free up space mac","mac disk cleanup","safe mac storage cleanup","delete chrome cache mac","remove old ai models mac","mac storage full solution"]}}