VSCode is a well-known, lightweight, powerful, open-source, and cross-platform source code editor. It gives you access to a wide variety of extensions that can boost your productivity, and as a result, it can enhance your development workflow.
Table of Contents
Despite the fact that it is quite lightweight, vscode can sometimes consume an excessive amount of resources (low disk space and memory). It's possible that the vs code extension is to blame for this limited disk space. If you have a lot of extensions installed, then it could take up a lot of space on your disk. Therefore, it is vital to be aware of the location where the vs code extension was installed. Therefore, you will have direct control over those extensions.
vscode extension installation location
By default, vscode extensions are installed in the physical location listed below:
In Windows Operating System
In Windows Operating System it is located under the following path:
Note that the environment variable
%userprofile% stores personal data of specific users therefore extensions are also as per specific user.
If you want to use a command to find all installed vscode extensions, use the following command.
code --list-extensions --show-versions
In Linux Operating System
In Linux based Operating systems like Ubuntu, and, Debian, etc we have a vscode extension in the following location:
In Macintosh Operating System(macOS)
vscode extension in mac os is located in the following location:
How to change the location of the extension in vscode?
If you can change the location of the vscode extensions. For this, we can use Symbolic Link. If you want to know more about the symbolic link click here.
A symbolic link is essentially a pointer that directs the computer to another file or folder that is placed in another location. Symbolic Links can be used for either an absolute or a relative path.
The syntax for Symbolic links:
mklink /D TargetLocation ActualLocation
mklink /D "E:\VSCODE_EXTENSIONS" "C:\Users\DELL\.vscode\extensions"
Here: %userprofile% is C:\Users\Dell
Here, we are relocating the folder "C:\Users\DELL\.vscode\extensions" to "E:\VSCODE_EXTENSIONS" When anything software or users tries to access directories within "C:\Users\DELL\.vscode\extensions" Windows will redirect the user and grab the files from "E:\VSCODE_EXTENSIONS" instead.
In this way, we can easily find the location of vs code extension in windows, mac, and Linux operating systems.