You can install, uninstall, list, update, and disable VS Code extensions entirely from the terminal using the code command. No need to open the Extensions view or click through the Marketplace UI.
If you have not set up the code command yet, see the VS Code command line interface guide. For managing extensions through the UI instead of the terminal, use the Extensions view.
Install an extension
Use the --install-extension flag followed by the full extension identifier in the format publisher.extension.
code --install-extension esbenp.prettier-vscodeVS Code downloads the extension from the Marketplace and installs it. You see the installation progress in the terminal. The extension activates the next time you open VS Code or immediately if VS Code is already running.
To install a specific version, append the version number. To install from a local VSIX file instead of the Marketplace, provide the file path. To skip any confirmation prompts, add --force:
# Install a specific version
code --install-extension ms-python.python@2024.0.0
# Install from a local VSIX file
code --install-extension ~/downloads/custom-theme.vsix
# Skip confirmation prompts
code --install-extension esbenp.prettier-vscode --forceSee how to install a VS Code extension from a VSIX file for VSIX-specific safety guidance.
Install an extension for a specific profile
Extensions can be scoped to a single VS Code profile using the --profile flag.
code --install-extension ms-python.python --profile "Python Dev"The extension installs only in the named profile. It does not appear in other profiles or the Default Profile.
Use the exact profile name shown in the Profiles menu.
Uninstall an extension
Remove an extension with --uninstall-extension. Provide the full publisher.extension identifier, just like you did when installing it. VS Code deactivates and removes the extension immediately:
code --uninstall-extension esbenp.prettier-vscodeVS Code removes the extension immediately. If VS Code is running, the extension is deactivated.
To target a specific profile, add the --profile flag:
code --uninstall-extension ms-python.python --profile "Python Dev"List installed extensions
See every extension you have installed with --list-extensions. Redirect the output to a file to save your list, or add --show-versions to include version numbers:
# Save extension list to a file
code --list-extensions > my-extensions.txt
# List with version numbers
code --list-extensions --show-versionsThis is useful for sharing your setup with a team or scripting an automated install on a new machine.
Filter by profile
List extensions for a specific profile:
code --list-extensions --profile "Python Dev"This shows only the extensions installed in that profile, not your global extensions.
Update all extensions
Update every installed extension to the latest version with one command:
code --update-extensionsVS Code checks each extension against the Marketplace and downloads newer versions. This command exits after the update completes. It is ideal for keeping a CI environment or a shared machine up to date automatically.
Disable all extensions temporarily
If you need to launch VS Code without any extensions active, use --disable-extensions:
code --disable-extensions .Extensions remain installed and appear in the Disabled section of the Extensions view, but none are activated. This is useful for troubleshooting performance issues or extension conflicts. Close the window and reopen normally to restore extensions.
Automate extension setup for a team
A common workflow is to commit a list of recommended extensions to your project repository and let team members install them with a single script.
Export your current extensions
Run code --list-extensions > .vscode/extensions.txt to save your installed extensions to a file inside the project's .vscode folder.
Commit the file
Add extensions.txt to your repository. Team members who clone the project get the list automatically.
Install from the list on a new machine
Each team member runs a script that reads the file and installs every listed extension. On Linux or macOS, a one-liner handles this: cat .vscode/extensions.txt | xargs -L 1 code --install-extension.
This pairs well with an extensions.json recommendations file, which suggests extensions inside the VS Code UI instead of the terminal.
Verify that an extension installed correctly
After running --install-extension, confirm it worked by listing the extension:
code --list-extensions | grep prettierIf the extension identifier appears in the output, it is installed. Open VS Code and check the Extensions view to confirm it is active and has no errors.
Rune AI
Key Insights
- Install an extension with code --install-extension publisher.name.
- Uninstall with code --uninstall-extension publisher.name.
- List all installed extensions with code --list-extensions.
- Update all extensions at once with code --update-extensions.
- Target a specific profile with the --profile flag.
- Export your list to a file for sharing or reinstallation on another machine.
Frequently Asked Questions
How do I install an extension for a specific VS Code profile from the command line?
Can I export my installed extensions as a list and reinstall them on another machine?
What happens if I install an extension that is already installed?
Conclusion
The code CLI gives you full control over extensions without leaving the terminal. Install with --install-extension, uninstall with --uninstall-extension, list with --list-extensions, and update all at once with --update-extensions. This is the fastest way to set up a new machine or share your extension list with a team.
More in this topic
How to Use VS Code with WSL 2 on Windows
Run VS Code connected to Windows Subsystem for Linux so you can develop in a full Linux environment with native tools, terminals, and debugging, all from Windows.
20 Best VS Code Extensions for Web Developers in 2026
Twenty carefully chosen VS Code extensions every web developer should know. Covers formatting, linting, frameworks, debugging, Git, and developer experience.
How to Install, Disable, Update, and Uninstall VS Code Extensions
Learn how to install, disable, update, and uninstall VS Code extensions from the Marketplace and the command line. Step-by-step instructions for every action.