Your IDE is probably the application you use most as a developer — and it's quietly hoarding gigabytes of caches, logs, workspace data, and extensions that you never see. Between VS Code's workspace storage, JetBrains' system caches and local history, and plugin/extension data across every editor you've tried, it's common to find 5-30GB+ of IDE-related files consuming precious SSD space on your Mac.
This guide covers every major IDE and editor on macOS with exact paths, audit commands, and safe cleanup procedures.
Run this comprehensive audit script to see how much disk space each IDE is consuming on your Mac:
#!/bin/bash
echo "=== IDE Cache Disk Usage Audit ==="
echo ""
echo "--- VS Code ---"
du -sh ~/Library/Application\ Support/Code 2>/dev/null || echo " Not found"
du -sh ~/.vscode/extensions 2>/dev/null || echo " Extensions not found"
du -sh ~/Library/Caches/com.microsoft.VSCode 2>/dev/null || echo " Cache not found"
echo ""
echo "--- Cursor ---"
du -sh ~/Library/Application\ Support/Cursor 2>/dev/null || echo " Not found"
du -sh ~/.cursor/extensions 2>/dev/null || echo " Extensions not found"
du -sh ~/Library/Caches/com.todesktop.runtime.Cursor 2>/dev/null || echo " Cache not found"
echo ""
echo "--- JetBrains ---"
for dir in ~/Library/Caches/JetBrains/*/; do
du -sh "$dir" 2>/dev/null
done
for dir in ~/Library/Application\ Support/JetBrains/*/; do
du -sh "$dir" 2>/dev/null
done
du -sh ~/Library/Logs/JetBrains 2>/dev/null || echo " Logs not found"
echo ""
echo "--- Sublime Text ---"
du -sh ~/Library/Application\ Support/Sublime\ Text 2>/dev/null || echo " Not found"
du -sh ~/Library/Caches/com.sublimetext.4 2>/dev/null || echo " Cache not found"
echo ""
echo "--- Neovim ---"
du -sh ~/.local/share/nvim 2>/dev/null || echo " Not found"
du -sh ~/.local/state/nvim 2>/dev/null || echo " State not found"
du -sh ~/.cache/nvim 2>/dev/null || echo " Cache not found"
echo ""
echo "--- Zed ---"
du -sh ~/Library/Application\ Support/Zed 2>/dev/null || echo " Not found"
du -sh ~/Library/Caches/dev.zed.Zed 2>/dev/null || echo " Cache not found"
du -sh ~/.local/share/zed 2>/dev/null || echo " Extensions not found"
echo ""
echo "--- Language Servers ---"
du -sh ~/Library/Caches/typescript 2>/dev/null || echo " TS server not found"
du -sh ~/.cache/pylsp 2>/dev/null || echo " Python LSP not found"
du -sh ~/Library/Caches/sourcekit-lsp 2>/dev/null || echo " SourceKit LSP not found"
echo ""
echo "=== Total Quick Estimate ==="
total=0
for d in \
~/Library/Application\ Support/Code \
~/.vscode/extensions \
~/Library/Caches/com.microsoft.VSCode \
~/Library/Application\ Support/Cursor \
~/.cursor/extensions \
~/Library/Caches/JetBrains \
~/Library/Application\ Support/JetBrains \
~/Library/Application\ Support/Sublime\ Text \
~/.local/share/nvim \
~/Library/Application\ Support/Zed; do
if [[ -d "$d" ]]; then
size=$(du -sk "$d" 2>/dev/null | awk '{print $1}')
total=$((total + size))
fi
done
echo "Estimated total IDE cache usage: $((total / 1024)) MB"
Visual Studio Code stores data across multiple locations on macOS. Here's where everything lives:
VS Code extensions are installed in ~/.vscode/extensions. Each extension can be 10-500MB, and old versions may linger after updates.
# Check total extension size
du -sh ~/.vscode/extensions
# List extensions by size (largest first)
du -sh ~/.vscode/extensions/* 2>/dev/null | sort -hr | head -20
# See what the VS Code CLI reports
code --list-extensions --show-versions | wc -l
To clean unused extensions:
# List all installed extensions
code --list-extensions
# Uninstall extensions you no longer need
code --uninstall-extension <publisher.extension-name>
# Example: remove a large extension
code --uninstall-extension ms-python.python
~/.vscode/extensions while VS Code is running. Use the CLI or the Extensions panel to uninstall properly.
Every folder you've opened in VS Code gets a workspace storage entry. This includes search history, file states, extension data per workspace, and more. Over months or years this grows significantly.
# Check workspace storage size
du -sh ~/Library/Application\ Support/Code/User/workspaceStorage
# Count workspace entries
ls ~/Library/Application\ Support/Code/User/workspaceStorage | wc -l
# Find and list workspace storage entries (each has workspace.json)
for d in ~/Library/Application\ Support/Code/User/workspaceStorage/*/; do
size=$(du -sk "$d" 2>/dev/null | awk '{print $1}')
name=$(cat "$d/workspace.json" 2>/dev/null | python3 -c "import sys,json; print(json.load(sys.stdin).get('folder','unknown'))" 2>/dev/null)
echo "${size}K ${name}"
done | sort -hr | head -20
To clean workspace storage for projects you no longer work on:
# Remove all workspace storage (VS Code will recreate for active workspaces)
rm -rf ~/Library/Application\ Support/Code/User/workspaceStorage
# Or selectively remove large/old entries
# First identify them with the script above, then:
rm -rf ~/Library/Application\ Support/Code/User/workspaceStorage/<hash>
# Main VS Code cache
du -sh ~/Library/Caches/com.microsoft.VSCode
# GPU shader cache and crash reports
du -sh ~/Library/Caches/com.microsoft.VSCode.ShipIt 2>/dev/null
# Clean the cache directory
rm -rf ~/Library/Caches/com.microsoft.VSCode/*
# Also check for Electron/Chromium cache
du -sh ~/Library/Application\ Support/Code/Cache
du -sh ~/Library/Application\ Support/Code/CachedData
du -sh ~/Library/Application\ Support/Code/CachedExtensionVSIXs
# Clean cached data
rm -rf ~/Library/Application\ Support/Code/Cache/*
rm -rf ~/Library/Application\ Support/Code/CachedData/*
rm -rf ~/Library/Application\ Support/Code/CachedExtensionVSIXs/*
# VS Code keeps logs for each session
du -sh ~/Library/Application\ Support/Code/logs
# Clean old logs (safe to remove all)
rm -rf ~/Library/Application\ Support/Code/logs/*
# Global storage used by extensions
du -sh ~/Library/Application\ Support/Code/User/globalStorage
# State database
du -sh ~/Library/Application\ Support/Code/User/History
Cursor is built on VS Code and mirrors its storage layout but under different directory names. If you use both VS Code and Cursor, you're effectively doubling the cache footprint.
# Cursor application data (mirrors VS Code's "Code" directory)
du -sh ~/Library/Application\ Support/Cursor
# Cursor extensions (separate from VS Code extensions)
du -sh ~/.cursor/extensions
# Cursor cache
du -sh ~/Library/Caches/com.todesktop.runtime.Cursor 2>/dev/null
# Clean Cursor caches (close Cursor first)
rm -rf ~/Library/Application\ Support/Cursor/Cache/*
rm -rf ~/Library/Application\ Support/Cursor/CachedData/*
rm -rf ~/Library/Application\ Support/Cursor/CachedExtensionVSIXs/*
rm -rf ~/Library/Application\ Support/Cursor/logs/*
# Clean workspace storage
rm -rf ~/Library/Application\ Support/Cursor/User/workspaceStorage
JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, CLion, GoLand, Rider, RubyMine, PhpStorm, DataGrip) are among the heaviest IDEs in terms of disk usage. Each IDE version maintains its own separate cache, config, and log directories.
JetBrains caches are stored in ~/Library/Caches/JetBrains/ with a subdirectory per product and version:
# List all JetBrains cache directories with sizes
du -sh ~/Library/Caches/JetBrains/* 2>/dev/null | sort -hr
# Example output:
# 4.2G IntelliJIdea2024.3
# 2.8G WebStorm2024.3
# 1.9G IntelliJIdea2024.2 ← old version, safe to remove
# 1.5G PyCharm2024.3
# 850M GoLand2024.3
# Total JetBrains cache size
du -sh ~/Library/Caches/JetBrains
Key insight: When JetBrains IDEs update to a new version, the old version's cache directory is left behind. These stale caches can accumulate to tens of gigabytes.
# Remove caches for old versions (keep only the latest)
# First, check which version you're currently running:
ls ~/Library/Caches/JetBrains/
# Remove caches for versions you no longer use
rm -rf ~/Library/Caches/JetBrains/IntelliJIdea2024.1
rm -rf ~/Library/Caches/JetBrains/IntelliJIdea2024.2
# Nuclear option: remove all caches (IDEs will rebuild on next launch)
rm -rf ~/Library/Caches/JetBrains/*
# Application support (plugins, configs, system files)
du -sh ~/Library/Application\ Support/JetBrains/* 2>/dev/null | sort -hr
# Plugins can be very large
for dir in ~/Library/Application\ Support/JetBrains/*/plugins/; do
du -sh "$dir" 2>/dev/null
done
# Logs
du -sh ~/Library/Logs/JetBrains/* 2>/dev/null | sort -hr
# Clean old version logs
rm -rf ~/Library/Logs/JetBrains/IntelliJIdea2024.1
rm -rf ~/Library/Logs/JetBrains/IntelliJIdea2024.2
JetBrains IDEs maintain a local VCS history of all file changes. This is incredibly useful for recovery but can grow large:
# Check local history size per IDE
for dir in ~/Library/Caches/JetBrains/*/LocalHistory; do
du -sh "$dir" 2>/dev/null
done
Every JetBrains IDE has a built-in cache invalidation feature:
This is the safest approach for your current IDE version, but it won't clean up old version directories.
If you use JetBrains Toolbox to manage your IDEs, it also maintains its own data:
# Toolbox app data
du -sh ~/Library/Application\ Support/JetBrains/Toolbox
# Toolbox keeps old IDE versions as backups
du -sh ~/Library/Application\ Support/JetBrains/Toolbox/apps/*/ch-0/* 2>/dev/null | sort -hr
# Check Toolbox settings → remove old IDE versions from Toolbox UI
Sublime Text is lightweight compared to VS Code and JetBrains, but it still accumulates data over time:
# Main Sublime Text data
du -sh ~/Library/Application\ Support/Sublime\ Text
# Breakdown:
du -sh ~/Library/Application\ Support/Sublime\ Text/Packages 2>/dev/null
du -sh ~/Library/Application\ Support/Sublime\ Text/Installed\ Packages 2>/dev/null
du -sh ~/Library/Application\ Support/Sublime\ Text/Cache 2>/dev/null
du -sh ~/Library/Application\ Support/Sublime\ Text/Index 2>/dev/null
du -sh ~/Library/Application\ Support/Sublime\ Text/Local 2>/dev/null
# System cache
du -sh ~/Library/Caches/com.sublimetext.4 2>/dev/null
# Clean the file index (rebuilt on next launch)
rm -rf ~/Library/Application\ Support/Sublime\ Text/Index/*
# Clean the cache
rm -rf ~/Library/Application\ Support/Sublime\ Text/Cache/*
rm -rf ~/Library/Caches/com.sublimetext.4/*
For Sublime Text 3 (if you upgraded):
# Check if old Sublime Text 3 data still exists
du -sh ~/Library/Application\ Support/Sublime\ Text\ 3 2>/dev/null
# If you've fully migrated to ST4, remove ST3 data
rm -rf ~/Library/Application\ Support/Sublime\ Text\ 3
rm -rf ~/Library/Caches/com.sublimetext.3
Modern Vim and Neovim setups with plugin managers (lazy.nvim, packer, vim-plug) can accumulate significant cache data, especially with LSP integrations.
# Neovim data directory (plugins, Mason LSP servers, etc.)
du -sh ~/.local/share/nvim
# Plugin manager data
du -sh ~/.local/share/nvim/lazy 2>/dev/null # lazy.nvim
du -sh ~/.local/share/nvim/site/pack 2>/dev/null # packer
du -sh ~/.local/share/nvim/plugged 2>/dev/null # vim-plug
# Mason (LSP/DAP/Linter installer) — this is often the biggest
du -sh ~/.local/share/nvim/mason 2>/dev/null
# Neovim state
du -sh ~/.local/state/nvim
# Neovim cache (compiled Lua, etc.)
du -sh ~/.cache/nvim
# Treesitter parsers
du -sh ~/.local/share/nvim/lazy/nvim-treesitter/parser 2>/dev/null
# Clean Neovim cache (rebuilt on next launch)
rm -rf ~/.cache/nvim/*
# Clean undo history (optional — you'll lose undo persistence)
rm -rf ~/.local/state/nvim/undo/*
# Clean swap files
rm -rf ~/.local/state/nvim/swap/*
# Vim plugin directories
du -sh ~/.vim/plugged 2>/dev/null # vim-plug
du -sh ~/.vim/bundle 2>/dev/null # Vundle/Pathogen
du -sh ~/.vim/pack 2>/dev/null # native packages
# Vim undo/swap/backup files
du -sh ~/.vim/undodir 2>/dev/null
du -sh ~/.vim/swapfiles 2>/dev/null
# Clean swap and undo
rm -rf ~/.vim/undodir/*
rm -rf ~/.vim/swapfiles/*
:Mason in Neovim to see all installed servers and remove ones you don't use.
Zed is a newer, performance-focused editor built in Rust. It's relatively lean but still accumulates cache data:
# Zed application data
du -sh ~/Library/Application\ Support/Zed
# Zed cache
du -sh ~/Library/Caches/dev.zed.Zed 2>/dev/null
# Zed extensions and language servers
du -sh ~/.local/share/zed 2>/dev/null
# Zed logs
du -sh ~/Library/Logs/Zed 2>/dev/null
# Clean Zed cache (close Zed first)
rm -rf ~/Library/Caches/dev.zed.Zed/*
# Clean old Zed logs
rm -rf ~/Library/Logs/Zed/*
Language servers run alongside your IDE and maintain their own caches. These are often shared across IDEs or installed independently:
# TypeScript server cache
du -sh ~/Library/Caches/typescript 2>/dev/null
du -sh /tmp/TypeScript_* 2>/dev/null
# SourceKit-LSP (Swift)
du -sh ~/Library/Caches/org.swift.sourcekit-lsp 2>/dev/null
# rust-analyzer
du -sh ~/.cache/rust-analyzer 2>/dev/null
# gopls (Go language server)
du -sh ~/Library/Caches/gopls 2>/dev/null
# clangd (C/C++)
du -sh ~/.cache/clangd 2>/dev/null
# Python language servers
du -sh ~/.cache/pylsp 2>/dev/null
du -sh ~/.cache/pyright 2>/dev/null
# Ruby Solargraph
du -sh ~/.solargraph 2>/dev/null
# Lua language server
du -sh ~/.cache/lua-language-server 2>/dev/null
# Clean all LSP caches
rm -rf ~/Library/Caches/typescript/*
rm -rf ~/.cache/rust-analyzer/*
rm -rf ~/Library/Caches/gopls/*
rm -rf ~/.cache/clangd/*
rm -rf ~/.cache/pylsp/*
rm -rf ~/.cache/pyright/*
Developers often try multiple editors before settling on one. Leftover data from abandoned IDEs can waste gigabytes:
# Check for data from IDEs you may have uninstalled
# VS Code (stable)
du -sh ~/Library/Application\ Support/Code 2>/dev/null
du -sh ~/.vscode 2>/dev/null
# VS Code Insiders
du -sh ~/Library/Application\ Support/Code\ -\ Insiders 2>/dev/null
du -sh ~/.vscode-insiders 2>/dev/null
# VS Codium
du -sh ~/Library/Application\ Support/VSCodium 2>/dev/null
du -sh ~/.vscode-oss 2>/dev/null
# Atom (discontinued)
du -sh ~/.atom 2>/dev/null
du -sh ~/Library/Application\ Support/Atom 2>/dev/null
# TextMate
du -sh ~/Library/Application\ Support/TextMate 2>/dev/null
# Nova (Panic)
du -sh ~/Library/Application\ Support/Nova 2>/dev/null
# Eclipse
du -sh ~/eclipse 2>/dev/null
du -sh ~/.eclipse 2>/dev/null
du -sh ~/Library/Application\ Support/Eclipse 2>/dev/null
# Android Studio (Gradle handled in separate guide)
du -sh ~/Library/Application\ Support/Google/AndroidStudio* 2>/dev/null
du -sh ~/Library/Caches/Google/AndroidStudio* 2>/dev/null
# Xcode (covered in our Xcode cleanup guide)
du -sh ~/Library/Developer/Xcode/DerivedData 2>/dev/null
If you find data for an IDE you no longer use, it's safe to remove all associated directories:
# Example: completely removing Atom data after uninstall
rm -rf ~/.atom
rm -rf ~/Library/Application\ Support/Atom
rm -rf ~/Library/Caches/com.github.atom
rm -rf ~/Library/Caches/com.github.atom.ShipIt
# Example: removing VS Code Insiders data
rm -rf ~/Library/Application\ Support/Code\ -\ Insiders
rm -rf ~/.vscode-insiders
rm -rf ~/Library/Caches/com.microsoft.VSCodeInsiders
Create a script that safely cleans IDE caches on a schedule:
#!/bin/bash
# ide-cleanup.sh — Safe IDE cache cleanup for macOS
# Run monthly or when disk space is low
set -euo pipefail
echo "🧹 IDE Cache Cleanup — $(date)"
echo "================================="
freed=0
cleanup() {
local path="$1"
local desc="$2"
if [[ -d "$path" ]]; then
size=$(du -sk "$path" 2>/dev/null | awk '{print $1}')
if [[ $size -gt 0 ]]; then
echo " Cleaning $desc: $((size/1024))MB"
rm -rf "$path"/*
freed=$((freed + size))
fi
fi
}
# VS Code caches (safe to remove)
echo ""
echo "--- VS Code ---"
cleanup ~/Library/Caches/com.microsoft.VSCode "VS Code system cache"
cleanup ~/Library/Application\ Support/Code/Cache "VS Code cache"
cleanup ~/Library/Application\ Support/Code/CachedData "VS Code cached data"
cleanup ~/Library/Application\ Support/Code/CachedExtensionVSIXs "VS Code cached VSIXs"
cleanup ~/Library/Application\ Support/Code/logs "VS Code logs"
# Cursor caches
echo ""
echo "--- Cursor ---"
cleanup ~/Library/Application\ Support/Cursor/Cache "Cursor cache"
cleanup ~/Library/Application\ Support/Cursor/CachedData "Cursor cached data"
cleanup ~/Library/Application\ Support/Cursor/logs "Cursor logs"
# JetBrains — remove old version caches
echo ""
echo "--- JetBrains (old versions) ---"
for dir in ~/Library/Caches/JetBrains/*/; do
dirname=$(basename "$dir")
# Extract version year — skip if it's the current year's latest
if [[ "$dirname" =~ 202[0-3] ]]; then
size=$(du -sk "$dir" 2>/dev/null | awk '{print $1}')
echo " Removing old $dirname: $((size/1024))MB"
rm -rf "$dir"
freed=$((freed + size))
fi
done
# JetBrains logs
cleanup ~/Library/Logs/JetBrains "JetBrains logs"
# Sublime Text
echo ""
echo "--- Sublime Text ---"
cleanup ~/Library/Application\ Support/Sublime\ Text/Cache "Sublime cache"
cleanup ~/Library/Application\ Support/Sublime\ Text/Index "Sublime index"
# Neovim cache
echo ""
echo "--- Neovim ---"
cleanup ~/.cache/nvim "Neovim cache"
# Zed cache
echo ""
echo "--- Zed ---"
cleanup ~/Library/Caches/dev.zed.Zed "Zed cache"
cleanup ~/Library/Logs/Zed "Zed logs"
# Language server caches
echo ""
echo "--- Language Servers ---"
cleanup ~/.cache/rust-analyzer "rust-analyzer"
cleanup ~/.cache/clangd "clangd"
cleanup ~/.cache/pylsp "Python LSP"
cleanup ~/.cache/pyright "Pyright"
echo ""
echo "================================="
echo "Total freed: $((freed/1024))MB"
echo "Done! All IDEs will rebuild caches on next launch."
Make it executable and optionally schedule with cron or launchd:
# Make executable
chmod +x ide-cleanup.sh
# Run manually
./ide-cleanup.sh
# Schedule monthly via crontab
crontab -e
# Add: 0 3 1 * * /path/to/ide-cleanup.sh >> /tmp/ide-cleanup.log 2>&1
| IDE / Editor | Typical Size | Key Cleanup Path | Safe to Delete? |
|---|---|---|---|
| VS Code Extensions | 1-5GB | ~/.vscode/extensions |
Uninstall via CLI |
| VS Code Cache | 200MB-2GB | ~/Library/Caches/com.microsoft.VSCode |
Yes (close IDE) |
| VS Code Workspace Storage | 500MB-5GB | ~/Library/Application Support/Code/User/workspaceStorage |
Yes (close IDE) |
| Cursor Extensions | 1-5GB | ~/.cursor/extensions |
Uninstall via CLI |
| Cursor Cache | 200MB-2GB | ~/Library/Application Support/Cursor/Cache |
Yes (close IDE) |
| JetBrains Caches | 2-10GB per IDE | ~/Library/Caches/JetBrains/ |
Yes (old versions safe) |
| JetBrains Logs | 100MB-1GB | ~/Library/Logs/JetBrains/ |
Yes |
| Sublime Text Index/Cache | 50-500MB | ~/Library/Application Support/Sublime Text/Index |
Yes (rebuilt) |
| Neovim Data | 500MB-3GB | ~/.local/share/nvim |
Cache only |
| Neovim Mason LSPs | 1-3GB | ~/.local/share/nvim/mason |
Reinstall via :Mason |
| Zed Cache | 100MB-1GB | ~/Library/Caches/dev.zed.Zed |
Yes (close editor) |
| Language Server Caches | 200MB-2GB | Various ~/.cache/ dirs |
Yes (reindexes) |
No. Your settings are stored in ~/Library/Application Support/Code/User/settings.json and extensions in ~/.vscode/extensions. The cache directories (Cache, CachedData, logs) are safe to remove — VS Code rebuilds them on launch. Your keybindings, snippets, and profiles are unaffected.
JetBrains IDEs maintain deep semantic indexes of your entire codebase, including symbol tables, reference graphs, and compiled stubs for all dependencies. They also keep local VCS history and caches per project. Each IDE version creates separate directories, so after several updates you may have 3-4 copies of these caches. Enable "Auto-delete previous version" in Toolbox to prevent this.
~/Library/Caches/JetBrains/ folder?Yes, but your IDE will need to re-index all projects on next launch, which can take several minutes for large codebases. The caches will be rebuilt automatically. Your settings, plugins, and license information are stored separately and won't be affected.
VS Code doesn't automatically clean up workspace storage when you delete a project folder. You can run the workspace storage audit script in Section 2.2 to identify entries pointing to folders that no longer exist, then delete those entries manually. Or simply remove the entire workspaceStorage directory — VS Code will recreate entries for projects you actually open.
Yes, removing ~/.local/share/nvim/mason will remove all Mason-installed language servers, linters, and formatters. You can reinstall them by opening Neovim and running :Mason, or by running :MasonInstall <server-name> for each one. If you have Mason configured in your init.lua with mason-lspconfig, servers will be reinstalled automatically.
Yes! ClearDisk is a free macOS menu bar app that monitors 44+ developer cache locations in real time, including VS Code caches, JetBrains caches, and extension directories. It shows exactly how much space each IDE is using and lets you clean them with a single click. Download it from the GitHub repository.
ClearDisk lives in your menu bar and monitors all your IDE caches in real time — VS Code, JetBrains, Cursor, Sublime Text, and 40+ other developer cache paths.
Get ClearDisk — Free & Open SourceRelated guides:
About ClearDisk: A free, open-source macOS menu bar utility that monitors developer cache disk usage in real time. Supports 44+ cache paths including Xcode, node_modules, CocoaPods, Gradle, Docker, pip, Cargo, Homebrew, and more. View on GitHub.