How to clear VS Code cache on Mac

It’s safe to clear VS Code cache on a Mac: it holds compiled code, web content of its windows and graphics data, which VS Code creates again on the next start. But your settings and unsaved files live in the same folder, and VS Code has no command to clear the cache, so this guide shows which folders are cache and which to leave alone.

MacWashing, System Junk: Xcode junk, user caches, installers and logs found, 22.83 GB ready to be cleaned
  1. Open MacWashing and choose System Junk in the sidebar.
  2. Click Start Scan.
  3. Look through what it found and click Clean. Anything debatable stays unchecked.

Free trial · macOS 14 or later

Is it safe to clear VS Code cache?

Yes. The cache holds files VS Code can create again: compiled code, web content of its windows and graphics data. VS Code has no command that clears it, so you delete the folders by hand. The first start afterwards is a little slower.

Your projects are not affected: VS Code opens folders where they are and doesn’t keep your code.

Which folders are cache

Most of the cache is inside ~/Library/Application Support/Code, next to your settings:

  • Cache and Code Cache — web content and compiled scripts of VS Code’s windows.
  • CachedData — compiled code VS Code keeps to start faster.
  • GPUCache — graphics data.
  • ~/Library/Caches/com.microsoft.VSCode — the app’s folder in the usual Caches folder.

How to clear VS Code cache

  1. Quit VS Code: choose Code › Quit Visual Studio Code (Command-Q).
  2. In Finder, choose Go › Go to Folder (Shift-Command-G), type ~/Library/Application Support/Code and press Return.
The Go to Folder panel with ~/Library/Application Support/Code typed
  1. Select the Cache, CachedData, Code Cache and GPUCache folders and move them to the Trash.
Finder, ~/Library/Application Support/Code: Cache, CachedData, Code Cache and GPUCache selected
  1. Open ~/Library/Caches/com.microsoft.VSCode the same way, select everything inside and move it to the Trash.
Finder, ~/Library/Caches/com.microsoft.VSCode with everything inside selected
  1. Open VS Code, check that it works, then empty the Trash.

What not to delete

  • User in ~/Library/Application Support/Code — your settings, keyboard shortcuts, snippets and local file history.
  • Backups next to it — changes of files you haven’t saved yet.
  • ~/.vscode — your installed extensions.
  • The whole Code folder: deleting it resets VS Code to a fresh install.

Other apps keep caches too: see how to clear cache on Mac.

With MacWashing, it’s one click

MacWashing, System Junk: Xcode junk, user caches, installers and logs found, 22.83 GB ready to be cleaned

System Junk in MacWashing finds VS Code’s own caches, like Code Cache, CachedData and GPUCache, under App Caches and clears them together with the caches of your other apps.

Free trial · macOS 14 or later

Questions and answers

Will MacWashing delete my own files when it cleans?

No. It removes only what it can match to a known app or a known kind of junk, in places apps leave files; macOS and Apple’s files are never touched. Anything debatable is marked and stays unchecked until you decide.

What about apps that are open?

If an open app holds files being cleaned, MacWashing waits for it to quit or quits it at your request, and opens it again afterwards.

Is it free?

Yes, within the free trial: System Junk and the Uninstaller free up to 25 GB in total, with no account or card needed.

Will clearing VS Code cache delete my settings or extensions?

No, as long as you delete only the cache folders. Settings are in the User folder and extensions in ~/.vscode, and both stay.

Can I delete the whole Code folder in Application Support?

Only if you want to start from scratch. Microsoft lists it as user data: deleting it resets VS Code’s settings. Turn on Settings Sync first if you want them back.

Why does the VS Code cache grow back?

VS Code creates it again as you work, and each update adds new compiled code. Clear it when you need the space.