Margulan
Margulan

Reputation: 191

Disable extensions in VScode from command line

Seems like some extension badly affects to run Vscode. When I try to open Vscode there is "Window no longer responding" How to disable Vscode extensions through cmd?

Upvotes: 19

Views: 14578

Answers (3)

Yuxi L
Yuxi L

Reputation: 88

My installation (Visual Studio Code 1.82.0 on MacOS 13.5.1) gives a way to disable a specific extension from the command line.

$ code --help

...

Usage: code [options][paths...]

...

  --disable-extension <ext-id>    Disable the provided extension. This option is not persisted and is effective only when the command opens a new window.

For example code --disable-extension ms-vscode-remote.remote-ssh disables the ssh extension (tested).

Upvotes: 2

Tom Herrmann
Tom Herrmann

Reputation: 1

Did you already look into the path of where the extensions are saved? The extensions are stored under %USER%\.vscode\extensions. Deleting that gets rid of them.

  • For Linux/MAC: ~/.vscode/extensions
  • For Windows: %USER%\\.vscode\extensions (or) %USERPROFILE%\.vscode\extensions

If you want to delete them from the console, you can do that by:

Mac/Linux

rm -rf ~/.vscode/extensions

Windows

rmdir %USERPROFILE%\.vscode\extensions /s

Upvotes: 0

soulshined
soulshined

Reputation: 10622

You can disable extensions via command line with the --disable-extensions flag

code --disable-extensions

Upvotes: 29

Related Questions