Editors keep a cache per workspace and an index per IDE version
Extensions, workspace state and indexes across both families of editor. What is safe and what holds your configuration.
An editor feels like it should be small, and the application is. What is not small is the collection of extensions, per workspace state and cached indexes it builds up, none of which is removed when you stop working on a project.
VS Code, three folders
Get-ChildItem "$env:USERPROFILE\.vscode\extensions","$env:APPDATA\Code" -EA SilentlyContinue |
ForEach-Object {
$s = (Get-ChildItem $_.FullName -Recurse -Force -File -EA SilentlyContinue | Measure-Object Length -Sum).Sum
'{0,8:N0} MB {1}' -f ($s/1MB), $_.FullName
}
(Get-ChildItem "$env:APPDATA\Code\User\workspaceStorage" -EA SilentlyContinue).Count| Folder | Holds | Safe to clear |
|---|---|---|
.vscode\extensions | Every extension and old versions | Uninstall through the editor |
Code\User\workspaceStorage | State for every folder ever opened | Yes, loses per project UI state |
Code\CachedData | Compiled script cache per version | Yes, rebuilt |
Code\logs | Session logs | Yes |
Code\User\History | Local file history | Only if you do not use it |
The workspace storage count is the surprising one: a folder per project ever opened, kept after the project is deleted, which on a machine used for a few years is hundreds of entries.
JetBrains, three more
Get-ChildItem "$env:LOCALAPPDATA\JetBrains","$env:APPDATA\JetBrains" -EA SilentlyContinue |
ForEach-Object {
$s = (Get-ChildItem $_.FullName -Recurse -Force -File -EA SilentlyContinue | Measure-Object Length -Sum).Sum
'{0,8:N0} MB {1}' -f ($s/1MB), $_.FullName
}LOCALAPPDATA\JetBrains holds indexes and caches, one set per product per version, and is where the size is. APPDATA\JetBrains holds settings, plugins and licences, and is the one to leave alone. Folders for versions no longer installed are pure leftovers.
Language servers are the large extensions
An extension that ships a compiler or runtime is hundreds of megabytes, which is why removing one you no longer use is worth more than it looks: you are removing a toolchain rather than a plugin.
Where editors sit
Rarely the largest developer folder on a machine. They belong beside the package caches and the build output in your projects, and the last of those usually wins.
Common questions
Where does VS Code store extensions on Windows?
In %USERPROFILE%\.vscode\extensions, one folder per extension and version. Application data, caches and workspace storage live under %APPDATA%\Code.
What is workspaceStorage in VS Code?
Per project state, one folder for every folder ever opened, kept even after the project is deleted. Clearing it loses editor state such as open tabs, not code or settings.
Where do JetBrains IDEs keep their caches on Windows?
Indexes and caches in %LOCALAPPDATA%\JetBrains, settings and plugins in %APPDATA%\JetBrains. The first is where the size is; the second holds your configuration.
Why do I have caches for IDE versions I removed?
Because each version creates its own folder and uninstalling does not remove them. Comparing folder names against what is installed shows which belong to nothing.