-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide functionality to delete temporary and cached files that do not affect core functionality #132509
Comments
See #32461 |
Thanks John. On following that discussion thread, it did not appear to me what the resolution was. Some users(?) were suggesting that workspaceStorage should be placed locally in the user's actual project directory itself instead of under /AppData/Roaming It was also not clear if the user can just delete all subfolders in this directory "workspaceStorage " |
It's still an open issue. I think you can safely delete those subfolder if you don't mind losing state information that some of your extensions have persisted for workspaces you have worked in. |
Great! Just deleted the subfolders and now the /Code/ folder is a more likeable 76 MB in size :-) Any thoughts on the other folders with "cache" in their names, John? Since the size is more manageable now, I am not overly concerned about them, but it would be good to know their utility as well. I am referring to folders "Cache", "CachedConfigurations", "CachedData", etc. |
Like many applications VS Code employs caching and storage to restore state and provide a faster experience. You will not lose any data by deleting these files unless you have unsaved changes. Deleting cached data will lead to a slower initial experience as the files are cached again |
Can some feature be provided that is able to restore VSCode's core functionality without breaking anything? In Windows OS, for instance, it is suggested to periodically delete the contents in %tmp% folder. In Google Chrome, there is a functionality to delete cache, cookies, and other browsing data. On my machine, the size of the
C:\Users\AppData\Roaming\Code
folder is an unpleasant 8.5 GB. This makes the footprint of VSCode almost like Visual Studio IDE itself if not more!On attempting to see what exactly is taking up so much space, I did the following experiment.
On navigating to
C:\Users\AppData\Roaming\Code
and issuing command:cmd /v /c "set zeropad=000,000,000,&for /f "delims=" %a in ('dir /ad /b') do @set bytes=!zeropad!000&(for /f "tokens=3" %b in ('dir /s "%a" 2^>NUL ^| find "File(s)"') do @set bytes=%b)& @for /f "tokens=1* delims=," %c in ('echo !bytes!') do @(set bytes=%c&@set bytes=000!bytes!&@set bytes=!bytes:~-3!& @set bytes=!zeropad!!bytes!&if "%d" NEQ "" set bytes=!bytes!,%d) & @echo !bytes:~-23! %a" | sort /R
from the command line (the above code sorts the directories in descending order of size: see https://stackoverflow.com/a/52266721) I obtain:
which tells me that the
User
subdirectory is 9 GB in size. Navigating inside of this directory, I reissue the above command to obtain a breakup of what is taking up space within this subdirectory:So,
workspaceStorage
takes up significant space. I navigate further within this directory and reissue the above command to obtain:What exactly are these folders and can they be safely deleted? Also, under /Code/ at the top level, there are multiple folders that have "cache" in their names. Can these be safely deleted by the user without breaking anything?
If this functionality is difficult to provide within VSCode, please specify in the documentation which folders can be safely deleted by the user that does not lead to breaking anything.
The text was updated successfully, but these errors were encountered: