~/Library/Application Support/Code: what is safe to delete?
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/CodeWhat 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
- Run the command below to see which subfolders are largest. It only reads sizes.
- Quit VS Code completely.
- 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.
- 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.
- Leave the rest of the User folder alone unless you want to reset VS Code.
du -sh ~/Library/Application\ Support/Code/* | sort -hr | head -15What 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
- VS Code extensions~/.vscode/extensions
- Cursor~/Library/Application Support/Cursor
- Application Support~/Library/Application Support
- Caches~/Library/Caches
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