Diskzyv0.1
Delete with care

~/Library/Application Support/Code: what is safe to delete?

Short answer

Do not delete the whole folder. The cache folders inside it are safe to remove, but the User folder holds your VS Code settings, keybindings, snippets and saved workspace state.

Where it is

~/Library/Application Support/Code

What it is

Visual Studio Code keeps its per-user data in ~/Library/Application Support/Code. The User folder contains settings.json, keybindings.json, your snippets, local file history, and two storage folders: globalStorage for extensions and workspaceStorage for each folder you have opened.

The rest is mostly disposable. Cache, CachedData, CachedExtensionVSIXs, Code Cache, GPUCache and logs are files VS Code can create again.

It grows because workspaceStorage gains a folder for every project you open and never removes it, and some extensions store large indexes or chat history there. Installed extensions are in a different place, ~/.vscode/extensions.

How big it gets

Usually from a few hundred MB to several GB. workspaceStorage is often the largest part on a Mac that has opened many projects.

How to clear it by hand

  1. Run the command below to see which subfolders are largest. It only reads sizes.
  2. Quit VS Code completely.
  3. Move the cache folders you find to the Trash: Cache, CachedData, CachedExtensionVSIXs, Code Cache, GPUCache and logs. Not every one exists in every version, and VS Code creates them again.
  4. If User/workspaceStorage is large, open it and sort the folders by date. Removing a folder resets what VS Code remembered for that project, such as open editors and extension state, so start with projects you no longer work on.
  5. Leave the rest of the User folder alone unless you want to reset VS Code.
In Terminal
du -sh ~/Library/Application\ Support/Code/* | sort -hr | head -15

What happens afterwards

VS Code rebuilds its caches on the next launch, which can be slightly slower the first time. If you removed workspace storage, those projects open with a clean state. Settings, keybindings, snippets and extensions are unchanged as long as you left the User folder and ~/.vscode alone.

How Diskzy handles it

Diskzy lists Electron app caches such as VS Code's in the Clean up tab, ticked unless the app is open. The disk map shows the size of each subfolder, including workspaceStorage.

Related guides

See where your Mac's space went

Diskzy maps your disk, explains System Data and clears what's safe. Free for 72 hours, then $9 once for 2 Macs.

Try Diskzy for free
Read this in:EnglishEspañolDeutschPortuguêsFrançaisTürkçe日本語