vscode extension install location?


πŸ‘€Β Diwas Poudel Β Β  πŸ•’ 18 Mar 2023 Β Β  πŸ“ FIX

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.

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.

Take note that extensions are put in a folder that is unique to the user who installs them. The location of the file can be found in the following folder, but it differs depending on the platform you're using.

vscode extension installation location

By default, vscode extensions are installed in the physical location listed below:

Also read: Check visual studio and visual studio code version and edition

1 In Windows Operating System

In Windows Operating System it is located under the following path:

%USERPROFILE%\.vscode\extensions

Note that the environment variable %userprofile% stores personal data of specific users therefore extensions are also as per specific user.

Also read: How to view the list of active remote desktop Users in Windows Server

If you want to use a command to find all installed vs code extensions, use the following command.

code --list-extensions --show-versions

2 In Linux Operating System

In Linux based Operating systems like Ubuntu, and, Debian, etc we have a vscode extension in the following location:

~/.vscode/extensions

3 In Macintosh Operating System(macOS)

vscode extension in mac os is located in the following location:

~/.vscode/extensions

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

For example:

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.

Note that for running mklink you may require administrative previlege. So, run the command with admin rights.

Install VSCode Extension Globally

You can install VSCode Extension Globally by placing the extension accessible for all the users and those place is as follows:

Windows

%ProgramFiles%\Microsoft VS Code\resources\app\extensions

Mac

/Library/Application Support/VSCode/extensions

Linux

/usr/share/code/extensions

How do I locate the installation spot of a particular VS Code extension?

To locate the installation location of a particular VS Code extension, open the Extensions view (Ctrl+Shift+X) and locate the extension in question. Select "Show in Explorer" (Windows) or "Show in Finder" (Mac) from the three-dot menu icon next to the extension. (macOS). This will access the folder containing the extension.

How do I make a backup of my loaded VS Code extensions?

To backup your installed VS Code extensions, just duplicate the extensions folder in your user's home directory (%USERPROFILE%.vscodeextensions on Windows). You can also export a list of all installed extensions to a JSON file using the built-in "Export Extensions" function. To access this function, open the Extensions view (Ctrl+Shift+X), click on the gear icon to open the Extensions menu, and pick "Export Installed Extensions".

Conclusion:

In this way, we can easily find the location of vs code extension in windows, mac, and Linux operating systems.