Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VsCode Remote SSH .vscode-server taking up a lot of space

I got an alert this morning for disk space in /home on a multi user remote SSH dev environment server.

Running partition -$xdev -type f -ls | sort -k 7 -r -n | head -20 I saw that the largest directories are .vscode-server with space nearing almost 1GB.

974M    .
10:06:16 my_user@my_server .vscode-server → pwd
/home/my_user/.vscode-server
10:08:06 my_user@my_server .vscode-server →  
29459 38028 -rwxr-xr-x   1 my_user  my_user  38940504 Aug 15 11:17 ./my_user/.vscode-server/bin/some_hash/node
26270 38028 -rwxr-xr-x   1 my_user  my_user  38940504 Sep  3 16:51 ./my_user/.vscode-server/bin/some_other_hash/node
24078 38028 -rwxr-xr-x   1 my_user  my_user  38940504 Oct 15 10:34 ./my_user/.vscode-server/bin/yet_another_hash/node
2387 38028 -rwxr-xr-x   1 my_user  my_user  38940504 Oct  9 01:58 /home/my_user/.vscode-server/bin/last_hash/node

Looking through the directories it looks like this is where a lot of VsCode lives on the remote server and where remote extensions are installed to.

Does anyone know if there is any safe files that can be cleaned up in .vscode-server or is just adding more space to /home the solution.

like image 761
ecaepp Avatar asked Oct 18 '19 15:10

ecaepp


1 Answers

From my practice, you can delete the .vscode-server directory to free the space. Next time you log in to this server, the system will automatically install another vscode-server which tends to be much smaller than the origin one.

like image 87
徐子昊 Avatar answered Sep 28 '22 19:09

徐子昊