Skip to main content

Want to switch from the Mole Mac site to the Windows site?

Go to the Windows site
Mole
MacWindows
Features Tested apps Testimonials Pricing FAQ Blog
EnglishEN 简体中文中 繁體中文繁 日本語日 한국어한 FrançaisFR DeutschDE ItalianoIT EspañolES PortuguêsPT NederlandsNL
Buy Download

    Help, documentation, releases, and articles.

    Blog

    Clear VS Code Cache on Mac Without Resetting Your Setup

    DeveloperPublished October 28, 20267 min read

    VS Code can take up space or keep misbehaving without needing a full reset. On a Mac, its Code folder mixes rebuildable caches with settings, workspace state and extension data, so clearing the whole folder is a much bigger change than clearing a cache. Start with a reload or an extension check, then remove only the cache you have identified.

    Know What Is Inside the Code Folder

    The standard Microsoft release uses ~/Library/Application Support/Code for user data. The default profile keeps its settings and state under User, while installed extensions normally live separately in ~/.vscode/extensions. Custom launch options can change these locations. Microsoft's settings documentation identifies the settings file, and its environment implementation separates workspace storage, logs and downloaded extension packages.

    Paths in the first column below are relative to ~/Library/Application Support/Code, except the last row.

    Location What it holds Decision
    Cache, Code Cache, GPUCache Chromium resource, compiled-code and graphics caches Rebuildable, clear only after quitting
    CachedData VS Code startup code cache, separated by build Rebuildable, next startup may be slower
    CachedExtensionVSIXs Downloaded extension installation packages Removable, future installs or updates may download them again
    User/workspaceStorage Per-workspace editor and extension state Keep by default, inspect individual entries
    User/globalStorage Persistent editor and extension data, potentially sign-in-related state Keep, not a general cache
    logs Diagnostic records from earlier sessions Remove old sessions only after troubleshooting
    User Settings, keybindings, snippets, profiles and other state Keep, including local history
    ~/.vscode/extensions Installed extensions Keep, manage through the editor

    Electron documents Chromium storage inside user data, including caches alongside cookies and local storage. Similar-looking neighbors are not permission to clear everything. These are implementation details, not a promise that every version creates every folder.

    Try VS Code's Own Routes First

    Save files, then open the Command Palette with Shift + Command + P and run Developer: Reload Window. This reloads the window, not a documented disk-cache purge. It is a smaller first step for a stale interface. The command's implementation calls the window reload operation.

    For behavior that started after an extension change, try disabling that extension rather than deleting its storage. Microsoft's performance troubleshooting describes Help: Start Extension Bisect, which disables groups of extensions and asks whether the problem remains. If one extension owns the problem, follow its own documented reset or rebuild action. There is no single cache operation that can safely reset every extension's arbitrary data.

    Measure Before Moving Anything

    In Finder, press Shift + Command + G and enter ~/Library/Application Support/Code. Inspect the individual folder sizes rather than treating the parent total as recoverable space. Terminal can measure the same locations without changing them:

    du -sh "$HOME/Library/Application Support/Code"/*
    du -sh "$HOME/Library/Application Support/Code/User"/* "$HOME/.vscode/extensions"
    

    The first line separates top-level caches from User; the second shows whether workspace or global storage accounts for most of that total. Do not add the parent and its children together. A missing-path message means that location is absent, while a permission error means the measurement is incomplete.

    These paths describe the standard stable installation. If you launch with --user-data-dir or --extensions-dir, inspect the specified directories instead. Microsoft's command-line reference documents both overrides. A remote development environment also needs its own investigation, rather than assuming its data is in this local folder.

    Clear Only the Rebuildable Part

    1. Save work, finish integrated-terminal tasks, and quit VS Code completely with Command + Q. Closing one window is not the same as quitting the app.
    2. Back up User before any experiment involving state, and keep a separate copy of anything an extension cannot recreate. Leave project folders and their own .vscode configuration alone.
    3. Open the Code folder in Finder and move only the identified Cache, Code Cache, GPUCache or CachedData folder to the Trash. Start with the relevant one, then test, rather than removing all neighboring folders.
    4. Review CachedExtensionVSIXs separately if downloads take the space. It holds installation archives, not the installed extensions. Keep any irreplaceable offline installer elsewhere before clearing it. The extension downloader reuses cached packages or downloads missing ones.
    5. Old logs sessions are optional cleanup once you no longer need the evidence. New sessions write new logs; deleted diagnostic history does not rebuild.

    Reopen the same project and check the original problem before emptying the Trash. Caches can return as resources are used again, and startup can initially take longer. That is expected rebuilding, not proof the cleanup failed.

    Treat Workspace Storage as State

    User/workspaceStorage contains folders identified by workspace IDs. Microsoft's workspace-storage implementation writes state.vscdb and workspace.json; extensions can store workspace-specific files there too. A large entry can hold useful local state, including extension conversations, rather than just an index.

    Read an entry's workspace.json to identify its folder or workspace. An entry can outlive a deleted or moved project, but a missing folder could also be on an unmounted drive. Confirm which case applies, back up the entry, quit VS Code, and only then consider removing that one entry. The project files are separate, but lost workspace or extension state is not restored simply by reopening them. Leave remote or unrecognized entries alone.

    Keep User/globalStorage. Resetting it can remove persistent extension data and require signing in again, with details varying by extension and VS Code version. Keeping settings.json alone does not preserve all of this state.

    Check Space and Diagnose What Remains

    Run the same measurements after reopening and using the project. Files in the Trash still occupy disk space until removed, so a smaller Code folder does not immediately mean more free disk space. Keep recovery available until settings, extensions and the original symptom have been checked.

    If the issue remains, try an isolated instance using fresh, unused directories:

    code --user-data-dir "$HOME/vscode-cache-test-data" --extensions-dir "$HOME/vscode-cache-test-extensions"
    

    This creates test data without resetting your normal setup. If code is unavailable, use the macOS setup linked from the command-line reference. Do not enable Settings Sync or install extensions before the first comparison. A successful clean instance points toward a difference in the normal profile or extensions, not necessarily a corrupt cache. If sign-in disappeared after cleanup, stop deleting and review which state folders were moved, restoring the backup with VS Code quit when appropriate.

    Where Mole Fits

    Mole Mac's Clean lists CachedData, Code Cache, GPUCache and existing WebStorage/<id>/CacheStorage leaves, selected by default when available. Application Support rows require Full Disk Access, and a running VS Code holds related rows until it quits. Orphaned User/workspaceStorage entries whose local folder no longer exists are review-only and start unchecked; Never Clean This Type excludes that VS Code rule, including future matches. These rows do not target settings, global storage or active extensions. Cache removal defaults to Delete permanently, including these workspace entries, which have no always-Trash exception. Choose Cache removal, then Move to Trash for recoverability. The VS Code tested-app guide covers the separate uninstall list.

    For removal rather than cache cleanup, use Uninstall VS Code on Mac. Package-manager and project build caches belong to the developer-cache guide.

    FAQ

    Will This Remove My Settings or Extensions?

    The narrow cache steps leave User and ~/.vscode/extensions in place. Removing the whole Code folder is a reset of user data, not the same operation, as Microsoft's uninstall documentation explains.

    Why Does the Cache Grow Again?

    VS Code rebuilds code and graphics caches as you use it. Missing extension archives may be downloaded during later installs or updates. Repeatedly deleting them does not fix an extension that keeps generating excessive data.

    Can I Delete All of Workspace Storage?

    That discards local state for every stored workspace. Inspect entries individually and keep backups; a folder recreated on launch does not mean its previous contents were recovered.

    Development tools take up more space over time. Mole helps you clean caches and find large files.

    Try Mole

    Keep reading

    • DeveloperClear Developer Caches Without Breaking Builds5 min read
    • DeveloperCursor High CPU or Memory on Mac: Find the Busy Work6 min read
    • DeveloperOllama Slow on Mac? Check Loading, Context and Memory7 min read

    Mole · 鼴

    Cleanup, software, and status for your Mac.

    v1.19.0 (348) · Release notes

    Product

    Mac Cleaner App Uninstaller Mac Optimizer Disk Analyzer System Monitor

    Support

    Help Documentation Releases Blog

    Legal

    Terms of Service Privacy Policy Refund Policy

    Resources

    For Windows CLI Tool Affiliate Program

    Connect

    Twitter hi@mole.fit

    Mole’s only official website mole.fit · Avoid installers from unknown sources

    The CLI stays free for terminal workflows.