Guide

How to clear VS Code cache on Mac, and Cursor's too.

VS Code and the editors built from it keep their caches next to your settings in Application Support, not in the Caches folder. Here's which folders to clear and which to leave.

The short version

Quit the editor with Command-Q. In ~/Library/Application Support/Code (or Cursor, or Windsurf), move Cache, CachedData, Code Cache, GPUCache, and CachedExtensionVSIXs to the Trash. Open the editor again and it rebuilds what it needs. Leave the User folder alone: it holds your settings, and in Cursor, your chats.

Where the VS Code cache lives on a Mac

VS Code is built on Electron, the same web tech as Slack and Discord, so it keeps its caches the way a browser does: inside its own folder in Application Support, beside your settings. Cursor and Windsurf started as copies of VS Code and use the same layout under their own names:

WhatDefault locationOn one Mac
VS Code~/Library/Application Support/CodeCache 105 MB, CachedData 145 MB on the Mac we measured
Cursor~/Library/Application Support/CursorCache 313 MB, extension downloads 486 MB on the Mac we measured
Windsurf~/Library/Application Support/WindsurfNot installed on the Mac we measured

Inside each one, these folders are caches. The editor rebuilds them on its own:

  • Cache: web content the editor downloaded, like extension pages and images.
  • CachedData: compiled code that makes the editor start faster. It keeps a folder per version, so old ones pile up after updates.
  • Code Cache and GPUCache: more compiled code and graphics data.
  • CachedExtensionVSIXs: copies of extensions as they were downloaded. Your installed extensions live in ~/.vscode/extensions (or ~/.cursor/extensions) and aren't touched.

To see how much space yours use:

cd ~/Library/Application\ Support/Code && du -sh Cache CachedData "Code Cache" GPUCache CachedExtensionVSIXs

How to clear VS Code cache on Mac, step by step

  1. Quit the editor. Press Command-Q. Closing the window isn't enough, and an editor that's still running writes the cache right back.
  2. Open its folder. In Finder, choose Go › Go to Folder and type ~/Library/Application Support/Code. For Cursor, type Cursor at the end instead.
  3. Move the cache folders to the Trash. Select Cache, CachedData, Code Cache, GPUCache, and CachedExtensionVSIXs, and press Command-Delete.
  4. Open the editor. It makes new, empty caches. The first launch is a little slower.
  5. Empty the Trash later. Once everything works, empty the Trash to reclaim the space.

Most guides say to use rm -rf in Terminal. That deletes the folders for good. The Trash does the same job and leaves you a way back.

What not to delete: the User folder

User holds your settings, keybindings, and snippets. Inside it, workspaceStorage keeps one folder for every project you've opened: open tabs, layout, and in Cursor, your chat history for that project. globalStorage holds extension data and sign-ins. Deleting these resets things you'd notice.

The exception is workspaceStorage folders for projects you've deleted. The editor never cleans those up, so they stay forever. Each has a workspace.json that names its project, so you can check whether the project still exists before moving one to the Trash.

How big the VS Code cache gets

On the Mac this page was written on, VS Code's caches came to about 260 MB and Cursor's to about 900 MB, most of it extension downloads. An editor you use every day with many extensions holds more. If yours is only a couple hundred megabytes, clearing it won't change much on your disk, but it's a common fix when an extension or the editor itself acts up after an update.

More caches, one tool at a time: npm, Xcode, or the full list.

Disk Forecast finds this for you

Disk Forecast lists these for you. Under Cleanup › Safe to clear, Editor and chat app caches shows each cache folder from VS Code, Cursor, Windsurf, and other apps built the same way, like Slack, Discord, and Figma, named by app. Under Worth a look, Editor data for deleted projects lists the workspaceStorage folders whose project is gone, unchecked. Everything goes to the Trash, and you can undo it. It's free.

Questions

How do I clear VS Code cache on a Mac?

Quit VS Code with Command-Q, then in ~/Library/Application Support/Code move Cache, CachedData, Code Cache, GPUCache, and CachedExtensionVSIXs to the Trash. Open VS Code again and it rebuilds them.

Where is the Cursor cache on a Mac?

In ~/Library/Application Support/Cursor, in the same folders as VS Code: Cache, CachedData, Code Cache, GPUCache, and CachedExtensionVSIXs. Windsurf uses ~/Library/Application Support/Windsurf.

Will clearing the VS Code cache delete my settings or extensions?

No. Settings live in the User folder and extensions in ~/.vscode/extensions. Neither is a cache. Leave both alone.

Does clearing the Cursor cache delete my chats?

Not if you only clear the cache folders. Cursor keeps chat history in User/workspaceStorage, one folder per project. Delete those only for projects that no longer exist.

Know before it's full.

Free. No account, no subscription.

macOS 14 or later · Apple Silicon and Intel · brew install --cask coreyhaines31/tap/diskforecast