'How can I properly clear the backup file cache of VSCode

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



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matt