How to Clean Cursor & VS Code AI Caches on Mac
Modern AI-assisted IDEs like Cursor, VS Code, and Windsurf silently hoard 15–50 GB across workspaceStorage, vector embedding indexes, and stale language server caches. Here is how to find and purge them safely without losing your preferences or keybindings.
Why Cursor and VS Code silently consume so much disk space
If you have been using Cursor, VS Code, or Windsurf for more than a few months, your ~/Library/Application Support directory likely holds between 15 GB and 40 GB of forgotten data.
Unlike simple text editors, AI-first IDEs continuously parse, chunk, and index your entire codebase locally into vector embeddings to power features like codebase search (@codebase), Copilot edits, and semantic search. These index files persist forever—even for Git branches and repositories you deleted six months ago.
# Check your actual IDE cache footprint in Terminal: du -sh ~/Library/Application\ Support/Cursor 2>/dev/null du -sh ~/Library/Application\ Support/Code 2>/dev/null du -sh ~/.cursor 2>/dev/null1. Cleaning workspaceStorage (The #1 Culprit)
Every time you open a folder in VS Code or Cursor, Electron creates a 32-character MD5 hash folder under User/workspaceStorage/. Inside, it caches:
- Language server symbol databases (
tsserver,rust-analyzer,pyright) - Timeline history & local file diff snapshots
- State dictionaries for every extension ever activated
Closing an editor does not delete its workspace storage. To see the largest storage hogs:
du -sh ~/Library/Application\ Support/Cursor/User/workspaceStorage/* | sort -hr | head -10It is completely safe to delete any hash folder inside workspaceStorage. When you next reopen that project, Cursor will recreate a clean, fresh index in seconds.
2. Purging Cursor Codebase Index Embeddings
Cursor stores full semantic vectors for your local projects in SQLite databases and chunk caches located in:
Over time, these vector files swell to 10–25 GB. You can safely clear this cache while Cursor is closed:
# 1. Quit Cursor completely (Cmd + Q) rm -rf ~/Library/Application\ Support/Cursor/User/globalStorage/cursor.cursor-indexing💡 Note: Your editor settings, themes, custom keybindings, and extensions are stored in settings.json and keybindings.json and are completely untouched by this operation.
3. Removing Extension Logs & Crash Dumps
Electron apps maintain extensive log directories that never self-prune. Delete telemetry archives, GPU caches, and crash logs with:
rm -rf ~/Library/Application\ Support/Cursor/logs/* rm -rf ~/Library/Application\ Support/Cursor/GPUCache rm -rf ~/Library/Application\ Support/Code/logs/* rm -rf ~/Library/Application\ Support/Code/GPUCache4. The 1-Click Automated Method (SpaceWise)
Manually managing hash directories and remembering terminal commands every month is tedious.
SpaceWise automatically discovers Cursor, VS Code, Windsurf, and JetBrains caches on your Mac. It correlates workspace hashes back to real folder paths, highlights abandoned projects, and lets you reclaim 20+ GB in 1 click with 100% safe undo support via your native macOS Trash.
Want to automate IDE cleanups?
Download SpaceWise to scan your IDE caches, Docker layers, and Xcode files in under 3 seconds.
Download Free for MacDo all of this in SpaceWise — for free
SpaceWise scans and safely cleans everything covered in this guide with one click. No Terminal required.
Download for Mac Free