temporary files – Visual Studio 2022 adds an overwhelming amount of folders into %TEMP%: Is it safe to delete them?


I am new (I’d say) to Visual Studio. I installed it about ~a month ago. Although, while using Visual Studio, I see a huge problem. As I open %TEMP% folder (user temp directory), I see a ton of folders with absolutely random names. Some of them are empty, some consist of a 0-byte JSON file with random name also. Just look at this mess. These are all generated by Visual Studio!
VS TempDirs

Now, I know these do not occupy disk space at all. But I absolutely don’t like looking at this mess.
I can use the Disk Cleanup tool that’s integrated into Windows. However, there are 2 things to mention:

  • Disk Cleanup only deletes 0-byte JSON files, not the directories.
  • There are some huge directories also created by Visual Studio, which Disk Cleanup actually would delete. But I think it is unsafe to delete them.

For example, take a look at this directory that’s in the TEMP directory as well, also with a completely random name. This one has a size of 1.7GB.
VS 1.7GB Directory

Basically, I think deleting this folder would cause problems with Visual Studio. It is also one of the folders Disk Cleanup can delete.

So my question is: Would deleting the following folders cause problems with Visual Studio 2022?:

  • VS
  • VSTempFiles
  • VSTelem
  • VSTelem.Out
  • VSFeedbackIntelliCodeLogs
  • VSFeedbackPerfWatsonData
  • VSFeedbackVSRTCLogs
  • MSBuildTempuser (where user is the name of the current user; it could be different)
  • NuGetScratch
  • The 1.7GB directory with a random name described above with an image
  • Tons of 0-byte directories with random names

Not important: I know that I may be asking too much here.

Leave a Reply

Your email address will not be published. Required fields are marked *