How to Downgrade a VS Code Extension

Sometimes, a recent update to a Visual Studio Code extension can introduce unexpected bugs, break your development workflow, or cause compatibility issues with your current environment. This article provides a quick, step-by-step guide on how to roll back any VS Code extension to a previous, stable version directly within the editor, as well as how to prevent it from automatically updating again.

Method 1: Downgrade Directly Within VS Code

The easiest way to roll back an extension is by using the built-in version manager in the VS Code Marketplace interface.

  1. Open the Extensions View: Click on the Extensions icon in the Activity Bar on the left side of VS Code, or press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS).
  2. Find the Extension: Search for the extension you want to downgrade in the search bar, or locate it under the “Installed” list.
  3. Open the Manage Menu: Click on the gear icon next to the extension’s name, or click on the extension to open its details page.
  4. Select “Install Another Version…”: If you are on the extension’s details page, click the dropdown arrow next to the blue “Uninstall” button (or click the gear icon next to “Uninstall”) and select Install Another Version….
  5. Choose Your Version: A dropdown list of previously released versions will appear at the top of the editor. Select the specific version you wish to install.
  6. Reload the Editor: Once the installation completes, VS Code will prompt you to reload the window. Click Reload Required to apply the changes.

Method 2: Install from a VSIX File (Manual Rollback)

If the version you need is not listed in the dropdown or if you are working offline, you can install the older version manually using a VSIX file.

  1. Go to the Visual Studio Code Marketplace in your web browser.
  2. Search for the extension and navigate to its page.
  3. Click on the Version History tab.
  4. Locate the version you need and click Download to save the .vsix file to your computer.
  5. In VS Code, open the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
  6. Click the three dots menu (...) at the top right of the Extensions pane.
  7. Select Install from VSIX…, locate the downloaded file, and click Install.

How to Prevent Automatic Updates for the Extension

By default, VS Code automatically updates installed extensions to their latest versions. To prevent the downgraded extension from immediately updating itself again, you must disable auto-updates for it.

  1. Open the Extensions view and go to the details page of the extension you just downgraded.
  2. Click the gear icon next to the “Uninstall” button.
  3. Uncheck the option that says Auto Update (or select Disable Auto-Update from the dropdown menu).

This will pin the extension to your chosen version while allowing your other VS Code extensions to update normally.