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

49,561

Solution 1

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.

Solution 2

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

Solution 3

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
Share:
49,561
digiwand
Author by

digiwand

Working on JavaScript web applications (remote since April 2018)

Updated on December 13, 2021

Comments

  • digiwand
    digiwand over 2 years

    How do I flush the cache for my Visual Studio Code on my Mac El Capitan OS?