If you often connect to your Linux server using VSCode, the "~/.vscode-server/" folder (and sometimes the ~/.cache/ folder too) can get very large because VSCode:
- Does NOT clean its download cache after installing extensions;
- Does NOT delete old extensions after updating them;
- Does NOT remove old VSCode servers after installing a new version.
If your server storage space is limited, you might consider cleaning "~/.vscode-server/" (and ~/.cache/) regularly using the bash script I wrote.
Simply run the following command:
curl -sL https://gist.githubusercontent.com/XDflight/5f3509eb84fc282b88059c909036f5bc/raw/fe2a3e7dab19160c17efc7025d138f5350964c0f/clean_vscode-server.sh | bash -s
This command will automatically download and run the script for you.
I programmed this thing because CMU only provides each student 2GB of AFS cloud storage in normal circumstances, unless maybe the courses you take requested for more, and since I often use VSCode to connect to Virtual Andrew via SSH to do homework, my "~/.vscode-server/" gets too big now and then that I have to clean it manually to keep my storage usage within the quota.
This script automates the process to make my life easier.
Thanks for this script, it has really come in handy when I reach my own space limitations on our cluster.
Not sure how helpful anyone else would find this, but I added a section to kill any lingering pixi child processes that are left over from VSCode and clean that cache since it can be a storage suck.
Anyone else using pixi might find it helpful.