VS Code on Linux Workstations

VS Code tends to take up a lot of disk space without ever clearing it up.

Cleanup

You can delete the following folders to clear up space:

rm -rf -- "${HOME}/.config/Code/CachedExtensionVSIXs/"
rm -rf -- "${HOME}/.config/Code/Cache/Cache_Data/"
rm -rf -- "${HOME}/.config/Code/CachedData/"

Set VS Code Directory outside of your Home Directory

When mostly using VS Code from the same workstation, you can set to have your cache and extensions stored on the machine locally by always starting code in a terminal via:

code --user-data-dir=/scratch/.cache/$USER/vscode_user_data_dir/ --extensions-dir=/scratch/.cache/$USER/vscode_extensions_dir/

VS Code-Server on Linux Workstations

Set where VS Code-Server gets installed on the remote Machine

By default, VS Code-Server gets installed in your D-Phys home folder when you connect to a managed Linux workstation. On your local machine (where you start the connection from), you can set the installation path inside ~/.config/Code/User/settings.json or in the VS Code settings window (search for "remote.SSH.serverInstallPath").
To do that in the settings.json file, add the following two lines and replace "WORKSTATION_NAME" and "YOUR USER NAME" with your target Linux machine (workstation you want to connect to) and your D-Phys user account name respectively.

    "remote.SSH.serverInstallPath": {
      "<WORKSTATION_NAME>": "/scratch/.cache/<YOUR_USER_NAME>/.vscode-server"
    }