VS Code Storage on Windows: Caches, Extensions and Persistent State
VS Code accumulates extensions, caches, logs, workspace state and extension-owned data. Deleting the entire Code folder can reset settings along with removing cache. Separate reproducible content from the development environment you need to retain. For sluggish editing, identify the working extension before treating storage cleanup as the remedy.
Distinguish program files, extensions and user data
In a standard Windows installation, program paths depend on the installer, extensions default to %USERPROFILE%\.vscode\extensions, and user data commonly resides in %APPDATA%\Code. Insiders, Portable Mode and custom --user-data-dir or --extensions-dir paths need separate checks.
| Content | Purpose | Retention decision |
|---|---|---|
| Installed extensions | Editing, debugging and language features | Keep active tools and their installation sources |
| Settings, shortcuts and snippets | Your configured workflow | Export and verify recoverable configuration |
| Workspace and extension state | Project state and persistent extension data | Keep uncertain content; follow extension export instructions |
| Download/runtime caches and logs | Reused downloads, generated results and diagnostics | Protect active content and logs needed for investigation |
The extension reference lists defaults, and the CLI reference describes custom directories and profiles. A project's .vscode directory is another scope, generally containing project configuration. Its matching name does not make it the user extension folder.
Record the current configuration
Use the CLI for the installation you identified. These commands list extensions with versions and report process diagnostics without removing files.
code --list-extensions --show-versions
code --status
The extension list is an inventory, not a copy of extension binaries, account state or work data. A profile groups settings and extension selections for a workflow; it is more than one settings.json file. With multiple profiles, inspect the current profile and use the documented profile option where needed. A default list is not an inventory of every profile.
Export relevant settings, shortcuts, snippets and extension selections through Profiles. Inspect the export. Project files and extension-owned content still need their own backups.
Disable before deciding to uninstall
For a reproducible delay in a project, choose Disable (Workspace) for a suspected extension, restart extensions when prompted and repeat the same action. Change one extension at a time and compare diagnostics with responsiveness. Uninstall through its management menu once you decide it is no longer needed.
Disabling keeps the installed files, so it tests behavior without reclaiming their installation space. Extension management distinguishes workspace/global disabling, uninstalling and enabling. Check whether debugging, language support or formatting still depends on the extension.
Local Windows, WSL and development-container environments can have separate extension installations. Inspect their location in the Extensions view; removing a local Windows copy does not establish remote removal.
Persistent extension state is not generic cache
The ExtensionContext API lets extensions store global and workspace-specific state. The extension determines the meaning: indexes, history, sessions or other retained content. Investigate the owner of large User\globalStorage or User\workspaceStorage entries rather than clearing their names indiscriminately.
The clean-uninstall guide treats removing user data as a reset. That changes the environment and should not be presented as routine cache cleanup. Export and verify recovery before an intentional reset, and check other installations that may share the data.
Check sync and profiles when extensions reappear
Settings Sync can synchronize extension inventories, enablement and selected profile data. Inspect synced data and the active profile when an extension reappears after merging or using another machine. Sync does not cover every remote extension or private extension file, so enabling it is not a full development-environment backup.
Mole Windows recognizes specific VS Code locations such as Cache, CachedData and extension-download caches, with process protection on the relevant runtime caches. That scope does not authorize removing the whole user-data folder. Save and quit the editor normally, retain diagnostic logs you need, then reopen the original project. Check settings, debugging, terminals and required extensions before repeating the original build or editing task.
For language-package caches, read caches versus project dependencies. For container environments and volumes, read the Docker/WSL storage guide.