Visual studio code consumes a lot of disk space during execution:
- 3GB on start-up.
- 2GB when running a script (Julia, in my case).
- When I kill the in-built terminal and rerun the code, the available storage first goes up by 2GB and then down again by 2GB.
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>AppDataRoamingCodeUserworkspaceStorage
and possibly in a C++ related folder
.
C:Users<user>AppDataLocalMicrosoftvscode-cpptoolsipch
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.
2
Answers
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:
You may need to visualise your disk space in specific folders to pinpoint that. A common reason for that may be IntelliSense cache.
To modify this go to settings and change intelliSenseCacheSize and intelliSenseCachePath If you set the value as 0 then it disables it completely.