VS Code CachedData on Mac: Is It Safe to Delete?
Low riskEditors & IDEsUpdated
- Location
~/Library/Application Support/Code/CachedData
- Risk level
- Low riskRebuilt automatically by macOS or the app that made it. Freshist selects these for you — you still see every item before anything moves.
- Selected by default
- Yes
- What Freshist does
- Moves the selected items to the Trash, so you can undo. Nothing is deleted outright.
- In the app
- Clean → VS Code Cache — “Editor cache — VS Code rebuilds it on next launch.”
From Freshist's own cleaning rules — the same catalog the app uses.
What CachedData is
VS Code is built on Electron, which runs its JavaScript with the V8 engine. To avoid compiling the same workbench code on every start, VS Code saves V8's compiled output as a code cache in ~/Library/Application Support/Code/CachedData. Each subfolder is named after the commit hash of the VS Code build that wrote it. On the Mac used to check this guide it held one build folder and 12 MB.
It sits next to many other folders in the same Code directory. Only some of them are caches:
Folder in Application Support/Code | Role | Safe to clear? |
|---|---|---|
CachedData | V8 code cache for VS Code itself | Yes |
Cache, Code Cache, GPUCache | Chromium caches for the editor UI | Yes, with VS Code quit |
CachedExtensionVSIXs | Downloaded extension packages | Yes; re-downloaded when needed |
User | Settings, keybindings, snippets, profiles, globalStorage | No |
Backups | Hot-exit copies of unsaved files | No, unless nothing is unsaved |
Why it can grow
Each VS Code update ships a new build and starts a fresh cache folder. VS Code's source includes a cleaner that, about 30 seconds after startup, removes cache folders for other builds once they are older than about three months on Stable (one week on Insiders), and always keeps the current one. So growth is limited, but if you update often you may see a few build folders at once.
What happens when you delete it
The next launch takes a little longer while VS Code compiles its code again and writes a new cache. After that, startup is back to normal. Nothing you created is lost. Clearing the cache folders is also a common first step when the editor shows rendering glitches or loads stale extension code after an update.
Looking inside
du -sh ~/Library/Application\ Support/Code/CachedData
ls ~/Library/Application\ Support/Code/CachedData
du -sh ~/Library/Application\ Support/Code/* | sort -h
code --version # the second line is the current build's commit
The folder whose name matches the commit from code --version belongs to the build you're running.
Clearing it by hand
VS Code has no menu command for this, so:
- Quit VS Code completely (Code → Quit Visual Studio Code), including any windows on other desktops.
- In Finder, choose Go → Go to Folder… and enter
~/Library/Application Support/Code/CachedData. - Move the build folders to the Trash, then reopen VS Code.
Insiders builds use Code - Insiders instead of Code, and editors based on VS Code use their own folder names.
Should you bother?
There's little reason to remove the current build's cache unless you're troubleshooting; it's small and makes startup faster. Older build folders are fine to delete. JetBrains users can compare the JetBrains cache guide, where clearing has a much bigger effect, and the folder this cache lives in is explained in the Application Support guide.
Sources
Frequently asked questions
Will deleting CachedData remove my extensions or settings?
No. Settings and keybindings live in the User folder next to CachedData, and extensions are installed in ~/.vscode/extensions. Only the compiled code cache is removed.
What are the long folder names inside CachedData?
Each folder is named after the commit of a VS Code build. After an update, the new build starts its own folder, and the old one remains until VS Code's cleanup removes it.
Should I delete the whole Code folder to fix VS Code?
No. ~/Library/Application Support/Code also holds your settings, keybindings, snippets, workspace state and data extensions saved. Deleting it is a factory reset. Clear only cache folders such as CachedData.