Bytewell
  • Features
  • Pricing
  • Menu
    • Features
    • Pricing
  • EN
    • English
    • Deutsch
    • Español
    • 日本語
    • Türkçe
    • 简体中文
    • 繁體中文
  • Download
Bytewell›Guides

Claude Code, Codex and Cursor disk usage: what's safe to clean

Updated November 1, 2026

AI coding tools write a lot to disk: session transcripts, file snapshots for undo, git worktrees for parallel agents, older runtimes, and editor state for every folder you opened.

The short answer: debug logs, shell snapshots and editor caches are safe to remove. Old session transcripts and agent worktrees are fine to remove once you've checked you don't need them. Leave Claude Code's memory and your settings alone.

On this page

  1. Where does Claude Code keep its data?
  2. Is it safe to delete Claude Code transcripts?
  3. Where do Codex and Gemini CLI keep their sessions?
  4. Why is my Cursor or VS Code folder so big?
  5. How do I clean up agent git worktrees?

Where does Claude Code keep its data?

  • ~/.claude/projects/: one folder per project with the session transcripts (.jsonl files). Claude Code removes transcripts older than its cleanupPeriodDays setting (30 days unless changed), so these grow mostly when that's raised.
  • ~/.claude/file-history: earlier versions of the files Claude Code edited, so changes can be rewound.
  • ~/.claude/debug and ~/.claude/shell-snapshots: logs and saved shell environments. Safe to remove.
  • <your repo>/.claude/worktrees/: git worktrees made for agents working in parallel.
  • The Claude desktop app keeps the Claude Code versions it downloaded in ~/Library/Application Support/Claude/claude-code; only the newest is used.

Keep the memory folders inside ~/.claude/projects/, your CLAUDE.md files and settings.json.

Is it safe to delete Claude Code transcripts?

Yes, with one cost: you can no longer resume those sessions with --resume or --continue, or rewind their edits. Memory is stored separately and stays.

Where do Codex and Gemini CLI keep their sessions?

  • Codex: ~/.codex/sessions and ~/.codex/archived_sessions (transcripts), log databases in ~/.codex, and worktrees in ~/.codex/worktrees.
  • Gemini CLI: ~/.gemini/tmp, with its sessions and checkpoints.

Why is my Cursor or VS Code folder so big?

Look in ~/Library/Application Support/Cursor (or Code, Windsurf):

  • Cache, CachedData, CachedExtensionVSIXs, Code Cache and GPUCache: safe to remove with the editor closed.
  • User/workspaceStorage: state for every folder you ever opened. Entries for folders that no longer exist are dead weight.
  • User/globalStorage/state.vscdb: settings and AI chat history, which can grow to several GB. Don't delete it. Quit the editor and compact it instead; deleted chats leave empty space that only compacting gives back:
sqlite3 ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb 'VACUUM'

Older versions of extensions also pile up in ~/.vscode/extensions and ~/.cursor/extensions after updates.

How do I clean up agent git worktrees?

Each worktree is a full checkout, often with its own node_modules and build output. In the repository:

git worktree list
git worktree remove <path>
git worktree prune

git worktree remove refuses a worktree with uncommitted changes unless you add --force, which is the check you want. Merge or push any branch you need first.

Bytewell lists these folders with their sizes, marked safe or review, shows each agent worktree's branch and whether it has uncommitted changes, and never offers Claude Code's memory. What you pick goes to the Trash, where it can be put back. AI agents can ask it the same things through its MCP server.

Download

Guides

  • Docker using too much disk space on a Mac: Docker.raw explainedDocker Desktop keeps everything in one file, Docker.raw. Why it looks huge, how to see what uses it, and which docker prune commands free space safely on Mac.
  • Where Ollama, LM Studio and Hugging Face store models on a MacWhere Ollama, LM Studio and Hugging Face keep local AI models on a Mac, how big they get, how to find the same model stored twice, and how to remove them.
  • How to check your Mac's SSD health and wearmacOS only says S.M.A.R.T. Verified. How to read your Mac SSD's real wear (Percentage Used, data written, errors), what the numbers mean, and what wears it out.
  • What is System Data on a Mac, and how do I make it smaller?System Data in Mac storage settings is caches, logs, Time Machine snapshots, swap, iPhone backups, app data and VM disks. What each is and what you can remove.
  • How to find and delete old node_modules folders and package caches on a MacFind every node_modules folder on a Mac with one command, see which package caches (npm, pnpm, Yarn, Homebrew, pip, Go, Gradle) are safe to clear, and how.
  • Videos or GIFs on X are black in SafariVideos and GIFs on X (Twitter) black in Safari while the timer runs, fine in Chrome? Safari's video helper is stuck. Quit Safari with Cmd+Q and reopen it.
  • Xcode taking up too much space: what's safe to deleteWhere Xcode keeps DerivedData, simulators, runtimes, device support and archives on a Mac, which of them rebuild themselves, and how to remove them safely.
Refunds Privacy Terms Contact

Bytewell is made by Axleno.

© 2026 Axleno LLC. All rights reserved.