visual-studio-codediskspace

Why does visual studio code consume so much disk space?


Visual studio code consumes a lot of disk space during execution:

When I exit VSCode all of the disk space reappears.

I'm wondering if there is a way to have VSCode consume less disk space.

From previous questions, it seems that VSCode may take up lots of storage in the workspace folder

C:\Users\<user>\AppData\Roaming\Code\User\workspaceStorage

and possibly in a C++ related folder .

C:\Users\<user>\AppData\Local\Microsoft\vscode-cpptools\ipch

Both folders take up no or very little space in my case.

I'm running VSCode version 1.72.2 on Windows 10. I tried to pinpoint the directory(ies) used by VSCode for this kind of temporary storage with windirstat but to no avail.


Solution

  • After installing all the latest Windows updates and freeing up space on my C drive, I can now run Visual Studio Code with virtually no disk space consumption (about 300MB). I'm not sure if it were the Windows updates or the additional disk space that helped. Anyway, here is how I freed up about 20GB of disk space: