For all of you using vscode out there, how do you deal with the .vscode-server directory in your home directory? It is making me exceed my allocation very regularly and it is a bit cumbersome.
My solution was to regularly delete it and let VSCode reinstall vscode-server. FWIW I havenāt had to do this in a little while, because I think Microsoft might have improved vscode-server to grow less in latest versions, but not sure.
VSCode leaves around lots of copies of stuff in .vscode-server/cli/servers. Iāve often gone and manually removed all but the most recent, but I canāt guarantee that wonāt delete some customisation settings.
There is an VSCode extension that claims to address some of these issues:
I just installed it and it seemed to clean up old servers and reduced space used from 3.2G to 1.1G.
Oh that looks promising @Aidan ! I think I messed up my vscode though because I straight deleted everything in the server folder and now I canāt open sessions. Ugh
I have no idea if this works for VS Code specifically, but thereās a thing called XDG Config which might help solve this.
The TLDR; is that config, by default, goes in ~/.config. If a system supports it (and this is the bit where I donāt know if VS Code will specifically or whether Gadi will ignore it (I donāt think it will), you could configure it:
ie. export XDG_CONFIG_HOME="/scratch/p73/ct1163/.config" in bash config would move my config to scratch.
Obviously moving all of your persistent config to scratch might not necessarily be the best idea. You might find moving it to your area in a project might work?
TBH, this is fraught with potential issues, but if you have a safe place to put your config it might be helpful. Take this as a āmaybe worth exploringā rather than a suggestion!
N.B. A cursory search indicated that to configure your vscode-server path you might want to instead do eg. (on your local machine):
{
"remote.SSH.serverInstallPath": {
"gadi": "/scratch/p73/ct1163/.vscode-server"
}
}
If youāre having to continually delete and reinstall VS Code to make this work, then thereās probably no harm in doing this specifically. Iāve left the XDG config stuff in as itās also useful to know about - ~/.config can often get surprisingly large.
There is a setting to define where .vscode-server is installed, and Iāve had that on /scratch/ for some time without apparent issue (I guess the old files get deleted after some time, but it hasnāt caused me issues so far).
Go to your vscode settings, then search āServer Install Pathā and select add.
Alternatively, in your user settings.json add:
"remote.SSH.serverInstallPath": {
"gadi.nci.org.au": "/scratch/<your_project_and_user_path>"
},
You can also just make ~/.vscode-server a symlink to a location on scratch or gdata.