2

I only really use VSCode for PowerShell. I keep multiple scripts open so that I can run code snippets throughout the day.

Whenever my computer restarts, due to patching, VSCode will open with a specific set of files that are mostly versions from over year ago. I close them... open up the current ones and move on.

Once I close the "bad" files and reopen VSCode I get a clean slate. Every time my computer reboots (vscode is usually open at that time) I get those old files back.

Normally this would be a feature I appreciate however it keep opening the same set of files and not even the ones I had open when I would have closed.

I found where I think the cached files are. This is one specific file I located because of the inspected content.

\AppData\Roaming\Code\Backups\424d9ba2737706ccdd3cbe4cb6568d4f\file\3d877002

I don't want to just purge all the files in that location. I am guessing there is another preferred method. I only seem to be locating recovery articles.

How can I properly clear the backup file cache of VSCode

Matt
  • 45,022
  • 8
  • 78
  • 119
  • duplicate of https://stackoverflow.com/questions/45216264/clear-file-content-cache-in-visual-studio-code – Kay V Mar 13 '22 at 15:02
  • @KayV I tried _Clear Search History_ and it doesn't appear to have worked. The files still come back. – Matt Mar 18 '22 at 14:24

1 Answers1

0

The reason this didn't make sense was because my AD account had an incorrectly configured Roaming Profile set to the local C:\temp folder. I'm honestly surprised I didn't have more issues. I only primarily use one computer so I wouldn't have noticed much.

Once I removed this configuration, the issue cleared after 2 reboots.

Matt
  • 45,022
  • 8
  • 78
  • 119