How do I flush the cache for my Visual Studio Code on my Mac El Capitan OS?
Asked
Active
Viewed 7.4k times
37
-
Does this answer your question? [Clear file content cache in Visual Studio Code](https://stackoverflow.com/questions/45216264/clear-file-content-cache-in-visual-studio-code) – Da2da2 May 12 '20 at 19:04
-
Yes. I believe Prancer's answer below includes the same solution found in that link plus more. Thank you for the link @Da2da2 – digiwand Jun 09 '20 at 20:41
3 Answers
60
rm -rf ~/Library/Application\ Support/Code/Cache/*
rm -rf ~/Library/Application\ Support/Code/CachedData/*

ttlg
- 601
- 5
- 4
40
I believe this is what you are asking... how to clear your file history cache (pulled from this git issue). It is very simple!
To clear your entire history ->
To clear history of specific files -> ">Remove From History"
If you are looking to clear your user or workspace settings, they are just files that can be cleared inside VSCode or manually deleted from your file system. This is documented in the VSCode docs.

Gianfranco P.
- 10,049
- 6
- 51
- 68

Prancer
- 3,336
- 2
- 32
- 38
-
3This solution is not only for macOS but also helped me out on Manjaro Linux. I gutess it works on Windows as well. Just wanted to make sure, People don't get scared by "macOS" and go on searching ;) – ecth Jan 09 '19 at 12:14
-
1
13
In my case, vscode always opened several projects at launch. To fix this bug I had to clear "workspace memory" (the local storage folder)
On mac OS
rm -rf ~/Library/Application Support/Code/Local Storage
Local Storage location
- Windows:
C:\Users\<userid>\AppData\Roaming\Code\Local Storage
- Linux:
/home/<userid>/.config/Code/Local Storage
- macOS:
/Users/<userid>/Library/Application Support/Code/Local Storage

ZecKa
- 2,552
- 2
- 21
- 39
-
-
1My VS code was endlessly looping and crashing due to a very large txt file trying to open. This helped me a ton to stop it from crashing. Thanks! – griff4594 Jun 15 '22 at 17:52