What Claude Code, Cursor, Ollama and Hugging Face leave on your Mac
AI tools are the new disk hogs. Coding assistants keep every session transcript, editors built on Electron keep their own caches, and local models are several gigabytes each. None of it shows up clearly in macOS’s storage settings; most of it lands in hidden folders or “System Data”.
Here’s where each tool keeps its files, how to see how big they are, and what you can clear safely. Everything below works with plain Terminal commands.
- Usually safe: editor caches (quit the app first), downloaded-update leftovers, old copies of Claude Code, and models you no longer use, removed with the tool’s own command.
- Think first: session transcripts. They’re what lets you resume or look back at an old conversation.
- Leave alone: settings, login files, project
memoryfolders, and Apple Intelligence’s models (macOS manages them).
Step 1: see what’s actually there
Paste this into Terminal. It lists each tool’s folder with its size, smallest first; folders you don’t have are skipped.
du -sh ~/.claude ~/.codex ~/.gemini ~/.ollama ~/.cache/huggingface \
~/.lmstudio ~/.cache/lm-studio ~/.local/share/claude \
~/Library/Application\ Support/{Claude,Cursor,Windsurf,Antigravity} \
2>/dev/null | sort -h
To look inside one of them, for example Claude Code’s folder:
du -sh ~/.claude/* 2>/dev/null | sort -h
Claude Code
| Folder | What it is | Safe to clear? |
|---|---|---|
~/.claude/projects/ | One folder per project, with a .jsonl transcript per session (plus a folder of tool output for some). | Old sessions, if you won’t resume them. Keep each project’s memory folder and today’s sessions. |
~/.local/share/claude/versions/ | Each Claude Code version it has installed. | Yes, all but the newest. Check which one ~/.local/bin/claude points to and keep that. |
~/.claude/debug/ | Debug logs, if you’ve run with debugging on. | Yes. One user found 472 GB here (report). |
~/.claude/settings.json, credentials | Your settings and login. | No. |
To find sessions older than 30 days without deleting anything yet:
find ~/.claude/projects -name '*.jsonl' -mtime +30 -print
The Claude desktop app
| Folder | What it is | Safe to clear? |
|---|---|---|
~/Library/Application Support/Claude/Cache, Code Cache, GPUCache | Electron caches. | Yes, with Claude quit. They rebuild. |
…/Claude/claude-code/ | Copies of Claude Code the app keeps for itself. | Older versions, yes; keep the newest. |
…/Claude/scratch-workspaces/ | Temporary workspaces from past tasks. | Old ones, yes. |
~/Library/Caches/com.anthropic.claudefordesktop.ShipIt | An update that was already installed. | Yes. |
Cursor, Windsurf and other VS Code–based editors
Cursor keeps its data in ~/Library/Application Support/Cursor (Windsurf and Antigravity use their own folder with the same layout).
| Folder | What it is | Safe to clear? |
|---|---|---|
Cache, CachedData, Code Cache, GPUCache, CachedExtensionVSIXs | Electron and extension caches. | Yes, with the editor quit. |
User/workspaceStorage/ | Per-project state, including AI chat history, one folder per project you’ve opened. | Folders for projects you’ve deleted or don’t use (each has a workspace.json naming its project). |
~/Library/Caches/com.todesktop.230313mzl4w4u92.ShipIt | Cursor’s installed update leftovers. | Yes. |
User/settings.json, ~/.cursor/extensions | Settings and extensions. | No. |
Codex and Gemini CLI
~/.codex/sessions/andarchived_sessions/: datedrollout-….jsonltranscripts. Old ones are safe to remove if you won’t look back at them.~/.codex/cacheandtmpare safe.~/.gemini/tmp/: Gemini CLI’s temporary files and old chats. Safe when the CLI isn’t running.
Local models: Ollama, Hugging Face, LM Studio
These are the big ones: a single model is often 4–40 GB. Remove models with the tool’s own command, not by deleting files, because models share pieces.
- Ollama (
~/.ollama/models):ollama listshows each model and its size;ollama rm llama3:8bremoves one. - Hugging Face (
~/.cache/huggingface/hub):huggingface-cli scan-cachelists what’s downloaded and its size;huggingface-cli delete-cachelets you tick what to remove. - LM Studio (
~/.lmstudio/models, or~/.cache/lm-studio/modelsin older versions): delete models from LM Studio’s My Models tab.
Apple Intelligence
Its on-device models take several gigabytes, but macOS manages them. Don’t delete them by hand; they’re part of the system and come back.
Or let a cleaner do the looking, carefully. SiftMac finds all of the above, says which session, cache or model each item is and when you last used it, never touches anything an open app is using, and keeps sessions and models out of its picks unless you choose them. Anything that can’t rebuild waits 7 days so you can put it back. Nothing leaves your Mac.
See SiftMac · free to try