How do you clear your Visual Studio Code cache on a Mac/Linux Machine?

rm -rf ~/Library/Application\ Support/Code/Cache/*
rm -rf ~/Library/Application\ Support/Code/CachedData/*

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

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 -> enter image description here

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.