

Using portable mode (documentation), all user data is stored in the installation directory, which is chosen by you. & sleep 3 & ls vs-user-data | grep -i cache Just a side note: I ran the following to confirm that the cache folders are actually under the user data directory: $ mkdir vs-user-data & code -user-data-dir vs-user-data. Specifies the directory that user data is kept in, useful when running as root. as usual, but have VS Code use the external directories for extensions and cache. You can add an alias to your shell startup script to facilitate this: alias code='code -extensions-dir /mnt/extdir/vsc-ext/ -user-data-dir /mnt/extdir/vsc-user-data/' Using /mnt/extdir/vsc-ext/ and /mnt/extdir/vsc-user-data/ as examples for desired external directories, you'd use: $ code -extensions-dir /mnt/extdir/vsc-ext/ -user-data-dir /mnt/extdir/vsc-user-data/. You provide the custom paths as command line arguments when invoking VS Code. This would work since it would be the extensions and cache folders that take up disk space, and since the cache folders are located under the user data folder. Your best option is probably to tell VS Code to use custom paths for extensions and user data.

Some options in order of recommendation: Use custom directories for extensions and user data
