Skip to content

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.

5 min read

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
FolderHoldsSafe to clear
.vscode\extensionsEvery extension and old versionsUninstall through the editor
Code\User\workspaceStorageState for every folder ever openedYes, loses per project UI state
Code\CachedDataCompiled script cache per versionYes, rebuilt
Code\logsSession logsYes
Code\User\HistoryLocal file historyOnly 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.

Read next