Everyday Toolkit

Troubleshooting VS Code: How to Clear the Extension Cache and Restore Speed

Published 2026-07-27

Updated Jul 2026

Some links on this page are affiliate links. If you buy through them we may earn a small commission at no extra cost to you. We only recommend what we'd use.

Key takeaways
  • Clearing the extension cache fixes lag and extension glitches without deleting your installed plugins
  • You can clear cache using built-in commands or manual folder removal
  • Windows, macOS, and Linux store cache files in distinct system paths
  • Cache maintenance is only necessary when performance drops or updates fail
Troubleshooting VS Code: How to Clear the Extension Cache and Restore Speed
Photo: jurvetson (BY) via Openverse
Clearing the VS Code extension cache deletes temporary installation packages and downloaded assets, resolving editor lag, failed extension updates, and plugin conflicts without removing your active extensions. This simple maintenance step clears out corrupted files and keeps Visual Studio Code running smoothly across all desktop platforms.

Why You Might Need to Clear Your VS Code Extension Cache

You should clear your VS Code extension cache whenever the editor experiences unexplainable slowdowns, extension update failures, or recurring error prompts. Over time, cached `.vsix` packages, temporary installation archives, and outdated extension assets accumulate. Removing these files forces VS Code to fetch fresh extension packages, eliminating corrupted data that hinders daily editor performance. When you install or update a plugin, Visual Studio Code downloads raw extension files into a staging directory before unpacking them. If a network drop interrupts this download, or if an extension updates incorrectly, stale and half-written files stay behind. While caching is designed to speed up setup times and reduce bandwidth usage, broken cached files actively degrade your development experience. Developers often notice this issue when an extension repeatedly prompts for an update that never sticks, or when IntelliSense features suddenly freeze up during routine coding.

Understanding the VS Code Extension Cache Location

Troubleshooting VS Code: How to Clear the Extension Cache and Restore Speed
Photo: lovekeyboard (BY-ND) via Openverse
The VS Code extension cache is stored in distinct file system paths depending on your operating system. Windows uses the `%APPDATA%\Code\ExtensionCache` directory, macOS relies on `~/Library/Application Support/Code/ExtensionCache`, and Linux manages extension data inside `~/.vscode/extensions`. Knowing these exact locations lets you perform targeted manual cleanups when built-in commands fail. Operating systems handle user application data differently, so locating these directories requires knowing where your system stores local application state: * **Windows:** Press `Win + R`, paste `%APPDATA%\Code\ExtensionCache`, and press Enter to jump directly to the cached installation files. * **macOS:** Open Finder, press `Cmd + Shift + G`, and enter `~/Library/Application Support/Code/ExtensionCache` to view cached archives. * **Linux:** Open your terminal or file manager and navigate to `~/.vscode/extensions` (or `~/.config/Code/CachedData` depending on your distribution setup). In most cases, deleting files inside `ExtensionCache` leaves your actively running extension code intact while wiping out stored installers that are no longer needed.

What is the Difference Between the Cache and Installed Extensions?

The extension cache holds temporary installation archives and downloaded packages, whereas installed extensions are the fully extracted, functional plugins running inside VS Code. Clearing your cache deletes staging files, but your installed extensions, settings, keybindings, and active workspace configurations remain entirely intact and ready to run. Think of the cache as a delivery box and installed extensions as the furniture you assembled out of it. Throwing away the empty cardboard box doesn't throw away the chair in your office. Because VS Code keeps staging files around in case you need to reinstall offline, that cache folder can quietly grow over months of regular development. Wiping the cache simply tells the editor to redownload fresh packages the next time an update occurs.

Method 1: Clearing the Cache via the Command Palette

Clearing the cache through the Command Palette is the fastest and safest approach for most users. Press `Ctrl+Shift+P` on Windows/Linux or `Cmd+Shift+P` on macOS, type `Clear Extension Cache`, and hit Enter. VS Code automatically removes unnecessary cached extension binaries and prompts you to restart the editor smoothly. This built-in approach is superior to manual deletion because VS Code safely identifies which files are active and which are safe to discard. It avoids accidental deletion of critical configuration files or active workspace state. If you are experiencing minor glitches after an editor update, executing this single command usually fixes the issue within seconds without touching your system file manager.

Method 2: Using the Developer Command Options

The `Developer: Clear Extension Cache` command operates similarly to the standard palette command but provides direct access through VS Code's internal developer tools. Open the Command Palette using `Ctrl+Shift+P` or `Cmd+Shift+P`, search for `Developer: Clear Extension Cache`, and select it to trigger a deep clean of extension staging data. Visual Studio Code includes a suite of developer commands specifically engineered for diagnosing workbench bugs and extension host failures. Running this specific developer command triggers an immediate cleanup routine that targets temporary runtime data, cached webviews, and leftover extension installation packages. It is particularly helpful when testing custom extensions or when an extension host unexpectedly crashes during your workflow.

Method 3: Manual Cache Deletion for Stubborn Issues

Manual cache deletion involves closing VS Code and directly deleting the contents of the cache directory via your OS file manager or terminal. This method is reserved for severe crashes where VS Code fails to launch or the Command Palette becomes unresponsive, giving you complete manual control over the cleanup process. Before manually deleting files, make sure to completely exit Visual Studio Code so no background processes are locking the target directory. Open your file manager or terminal, navigate to your platform's `ExtensionCache` path, and select all contained files and folders for deletion. Avoid deleting the main `extensions` folder unless you intend to wipe and reinstall every extension from scratch. Once the cache directory is emptied, launch VS Code; the editor will recreate a fresh, clean cache structure automatically.

When to Clear Your Cache: Key Troubleshooting Scenarios

Clear your VS Code extension cache when encountering sluggish startup times, failed extension updates, high CPU usage from extension host processes, or syntax highlighting errors. While routine clearing is unnecessary, wiping the cache serves as an effective first-line fix whenever plugins exhibit abnormal behavior or refuse to load properly. You don't need to make cache clearing a weekly habit. However, keep this fix in mind for specific situations: * **Endless Update Loops:** An extension reports an available update, downloads it, but repeatedly prompts you to update again after restarting. * **Unexplained Editor Lag:** Typing becomes delayed or language servers take several minutes to index simple project files. * **Corrupted File Downloads:** A network drop during an extension update leaves corrupt files that block subsequent installation attempts. * **Extension Host Crashes:** VS Code displays recurring pop-ups stating that the extension host terminated unexpectedly.

Best Practices to Prevent Extension Cache Bloat

To prevent extension cache issues, keep VS Code and installed plugins updated, audit and remove unused extensions regularly, and avoid forcefully terminating the editor during active plugin installations. Maintaining a lean extension list keeps cache directory sizes manageable and minimizes background resource consumption across your development environment. Managing extensions proactively saves time down the road. Disable or uninstall plugins you only needed for a single past project rather than letting them run quietly in the background. Additionally, turning on auto-updates ensures that extension developers' bug fixes reach your system promptly. If you frequently work with diverse tech stacks, consider using VS Code Profiles to group extensions by project type so only necessary plugins load at any given time.

Comparing VS Code Cache Clearing Methods

Selecting the right cache-clearing method depends on whether VS Code can currently open and how comfortable you are navigating system folders. Built-in palette commands offer high safety for routine maintenance, whereas manual file deletion provides a direct recovery route when the editor environment freezes or crashes on launch.
Method Ease of Use Risk Level Best Used When
Command Palette Very High Very Low Routine slowdowns or minor extension glitches occur.
Developer Command High Low Diagnosing extension host crashes or debugging custom plugins.
Manual Deletion Moderate Medium VS Code fails to launch or the Command Palette is unresponsive.

🛍 Ready to buy? Check current prices on Amazon for the picks in this guide.

Frequently Asked Questions

Will clearing the cache delete my installed extensions?

No, clearing the cache only deletes downloaded installation packages and temporary staging files. Your installed extensions, custom settings, keybindings, and theme configurations remain completely safe and untouched.

How often should I clear the VS Code extension cache?

You only need to clear the cache when troubleshooting active issues like sluggish performance, failed updates, or extension host errors. Routine cache clearing is generally unnecessary during normal editor operation.

Can manual cache deletion break my VS Code installation?

As long as you only delete files inside the designated `ExtensionCache` directory, your editor will remain safe. However, manually deleting the root `.vscode` folder will remove your installed plugins, requiring reinstallation.

What should I do if clearing the cache does not resolve the issue?

If clearing the cache fails, try disabling your extensions one by one to isolate a problematic plugin, check VS Code system logs via Output view, or update the editor to the latest stable release.

Does clearing the cache free up significant disk space?

It can free up hundreds of megabytes if accumulated `.vsix` installer packages have built up over time. However, the primary benefit is resolving file conflicts rather than reclaiming massive amounts of storage space.

🛍 See today's best prices on Amazon and grab the option that fits you.

Editorial Team Author & reviewer

Hands-on reviewers testing tools, apps and services so you do not have to. Every article here is hands-on tested and human-reviewed before publishing.