Skip to content
How it worksSafetyPricingQuestions
FR · Français Download
← All guides

Where AI coding agents store data on your Mac, and what is safe to delete

Last checked 12 October 2026

AI coding agents store conversations, caches and old versions in hidden folders: ~/.claude, ~/.codex, ~/.gemini, and Application Support for Cursor, Windsurf and Claude Desktop. Caches and old versions are safe to delete. Conversations are safe only if you won't resume them. Settings, memory and sign-in: never.

Where each agent stores its data

AgentWhere it writesWhat growsNever delete
Claude Code~/.claude, ~/.local/share/claude/versionsConversations in projects/, old versions, file-history/Settings, CLAUDE.md, skills, memory/ folders, .credentials.json, ~/.claude.json
Codex~/.codexConversations in sessions/, old versions in packages/config.toml, AGENTS.md, memories, auth.json
Claude Desktop~/Library/Application Support/Claude, ~/Library/Logs/ClaudeThe Cowork virtual machine (vm_bundles), embedded Claude Code versions, cachesclaude_desktop_config.json, config.json
Cursor~/Library/Application Support/Cursor, ~/.cursorCaches, per-workspace statesettings.json, keybindings.json, mcp.json
Windsurf~/.codeium/windsurf, ~/Library/Application Support/Windsurf, ~/.windsurfCascade conversations, cachesmemories, global_rules.md, mcp_config.json, your settings
Cline~/Library/Application Support/<editor>/User/globalStorage/saoudrizwan.claude-devTasks (conversations) and checkpointsIts settings and state folders
Gemini CLI~/.geminiSaved chats in tmp/, checkpoints in history/oauth_creds.json, settings.json, GEMINI.md
Copilot CLI~/.copilotSessions in session-state/, logsconfig.json, mcp-config.json, agents/
OpenCode~/.local/share/opencode, ~/.cache/opencodeConversation database, snapshots, cacheauth.json, ~/.config/opencode

Paths were observed on macOS with current versions; the date at the top of this page says when they were last checked.

The four kinds of files, and what deleting them costs

Every agent writes the same four kinds of files. Knowing which kind you are looking at answers "is it safe?" before you open a single folder.

KindExamplesVerdictWhat you lose
Caches, logs, temporary filescache/, logs/, tmp/, shell-snapshots/SafeNothing visible: the agent recreates them
Old versions~/.local/share/claude/versions, ~/.codex/packagesSafe, except the version in useNothing, as long as you keep the current one
Conversations and checkpoints~/.claude/projects, ~/.codex/sessions, Cline tasksReviewThose sessions can no longer be resumed, and checkpoints can no longer rewind your files. Your code is not modified.
Settings, memory, sign-insettings.json, CLAUDE.md, memory/, auth.jsonNever deleteYour setup, what the agent learned, your login

Why it keeps growing

None of these agents empties its own folders aggressively. Every session adds a transcript, every update adds a version, and every edit adds a snapshot. Git worktrees created by agents, node_modules in each worktree, Docker images and Xcode builds usually weigh even more than the agents' own folders, and they follow the same pattern: created by an agent, never removed.

To see where your space goes:

du -sh ~/.claude ~/.codex ~/.gemini ~/.copilot ~/.cursor ~/.codeium \
       ~/Library/Application\ Support/{Claude,Cursor,Windsurf} 2>/dev/null | sort -h

Nothing above deletes anything.

Before you delete anything

  1. Quit the agent. Cleaning a folder an open session is writing to interrupts it.
  2. Start with caches and old versions: they are safe and often the largest win.
  3. For conversations, keep what you might resume this week. Export what you want to keep as text before deleting.
  4. Never delete an agent's whole folder: it holds your settings, memory and sign-in next to the caches.

Doing it with Ouste

Ouste reads all of these folders, classifies every item as Safe, Review, Risky or Protected with the sentence that says what you lose, and puts anything you might regret in a 7-day quarantine you can restore in one click. Settings, memory and sign-in files are never touched.

Guides by agent and topic

  • What is in ~/.claude, and what is safe to delete
  • What is in ~/.codex, and what is safe to delete

Questions

Is it safe to delete the whole ~/.claude or ~/.codex folder?

No. These folders hold your settings, the agent's memory and your sign-in next to the caches. Delete the caches, old versions and conversations you no longer need, never the whole folder.

Will deleting conversations change my code?

No. Conversations are transcripts. Deleting them means the session can no longer be resumed; your project files are not modified.

Why does the space come back after I clean up?

Every new session writes a new transcript and every update downloads a new version. Cleaning up regularly, or lowering the retention settings the agents offer, keeps it in check.

Ouste does this for you. It finds what your agents leave behind, says what each item is and what you lose, and puts anything you might regret in a 7-day quarantine. Free to scan and clean.

Download Ouste

macOS 14 or later · Apple Silicon

Less noise. More control.

Product

  • How it works
  • Safety
  • Pricing
  • Questions

Information

  • Legal notice and terms
  • Privacy
  • Guides
  • contact@ouste.space

Language

  • Français
  • English
© 2026 Ouste. Published by Adeo Consulting, Paris. macOS 14 or later · Apple Silicon