How to upgrade Visual Studio Code editor?
What’s the best way to upgrade Visual Studio Code on Linux Ubuntu?
For the time being I was periodically getting the newest version (.deb) from their official site: https://code.visualstudio.com/
12 Answers 12
Visual Studio Code enabled official Linux repositories on February 2017 (v1.10)
You can upgrade / dist-upgrade as usual
[1]: download the latest vscode (.deb) package to your computer on this link :
[2]: then open a terminal in the folder where you downloaded the .deb file and write:
[3]: finally if you have apt-get do (if not install apt-get first):
If you have installed it via the repository, exit VS Code then just do:
This is the same command to install or upgrade to the latest version. You can see the version with:
How can I update Visual Studio Code on Ubuntu?
I downloaded the .tar.gz version of VS Code for Ubuntu (64-bit) and have been able to run it smoothly for some time. Some extensions have been installed too.
How can I efficiently update this VS Code installation? One thing I can think of is to just download the new .tar.gz archive and extract to the same location, just keeping the old «extensions» folder.
If I use the .deb version, would the same process be needed? Would I download the new .deb every time there is an update?
12 Answers 12
The following commands work for me:
Place those two commands into an executable Bash script called auto-update-vscode , and you can simply run that from your shell any time Visual Studio Code says it’s out of date.
Updated answer October 2021:
If you installed the software using the .deb file you don’t have to download the package manually. You can just do:
Vladimir S. posted the correct solution, although he originally didn’t link directly to the section that had the answer. The direct link is here.
For those who’d rather not click, here’s the official solution per Microsoft:
Debian and Ubuntu based distributions
The easiest way to install for Debian/Ubuntu based distributions is to download and install the .deb package (64-bit) either through the graphical software center if it’s available or through the command line with:
Installing the .deb package will automatically install the apt repository and signing key to enable auto-updating using the regular system update mechanism (apt update). Note that 32-bit and .tar.gz binaries are also available on the download page.
The repository and key can also be installed manually with the following script:
Then update the package cache and install the package using:
In true Microsoft style, they decided to call the package just code . So download the latest .deb and:
Configuration files, installed extensions and even currently used folder are preserved.
Since version 1.10.2, Visual Studio Code has got the official signed repositories for Linux. Please look here.
Use the script available in this repository: github.com/moeenz/vscode-updater
Visual Studio Code is officially distributed as a Snap package in the Snap Store:
You can install it by running:
Once installed, the Snap daemon will take care of automatically updating VS Code in the background. You will get an in-product update notification whenever a new update is available.
If you get an error message
The simplest solution is to download the latest binary from the Official Source and then install it by executing the following:
This will reinstall code over the older version. Your settings and installed extensions will remain unchanged as expected.
There are two PPAs hosted on GitHub and openSUSE. You can use https://github.com/tagplus5/vscode-ppa before Visual Studio Code has its official PPA.
Follow the steps given below:
Download the latest version of Visual Studio Code as a .deb package.
Install GDebi Package Installer (if not installed).
Then remove Visual Studio Code (older version) by opening its .deb package (which you downloaded earlier) using GDebi Package Installer and then click on «Remove Package» option.
Then open the .deb package of the latest version of Visual Studio Code using GDebi Package Installer and click «Install Package» and install latest version of Visual Studio Code.
All your configurations (packages installed and other customisations) in Visual Studio Code which you did earlier will be restored automatically even after following the above procedure. So you need not worry about installing the packages again. You will find those customisations and packages automatically in the latest version you have installed.
Updating through this procedure doesn’t remove/purge configuration files of Visual Studio Code and that’s why, all your configurations in Visual Studio Code are restored.
This procedure works also for other code editors, like Sublime Text 3 and Atom. I have myself tested and verified it.
How to update to the latest release
The following shows you how to update to the latest release of Visual Studio Code.
Note: For Mac and Windows users, we have enabled the auto-update channel. If you’re prompted by VS Code, accept the newest update and it will get installed (you won’t need to do anything else to get the latest bits).
Auto-updates are not supported for Linux.
Updating on Linux
- Download the VS Code zip file: 64-bit or 32-bit.
- Open the zip and run Code
Updating on OS X
You need to do this only if auto-update did not complete.
- Download the VS Code zip file from here.
- Open the zip file and drag Code over to Applications.
- Launch Code.
Updating on Windows
You need to do this only if auto-update did not complete.
Important: Close any running instances of VS Code before attempting to update (to avoid VS Code not being able to start after you update).
- Run the installer from here.
- If you have trouble with the Windows installer, download the VS Code zip file from here.
Common Questions
Q: How do I know which version I’m running?
A: In Linux and Windows, choose Help, About. In OS X, use Code, About Visual Studio Code.
Q: What are the supported operating system versions needed to run Visual Studio Code?
How to update VSCode on Linux
Whenever VSCode makes a new version available, it prompts you to go to the website and manually download the deb package. But downloading the deb everytime there is an update…just sucks.
Luckily, Microsoft has introduced official signed repositories with the February 2017 (v1.10) update. So to update VSCode, you need to do the following:
This will install the new version of VSCode with all your old extensions still enabled.
The next time a dialog box prompts you that there is a new version available, you don’t need to do the above steps again. You can upgrade it using:
Note: If you are unfamiliar with dist-upgrade , this might prove to be a good read.
After the update, reload the window. You should be welcomed with release notes for the new version. This means that the update was successful and you got it up and running!
Subscribe via RSS
Site Map
- About Me
- Archive
- Talks
Contact
- hello@nikhita.dev
- TheNikhita
- nikhita
- Nikhita Raghunath
Subscribe via RSS
A personal website about technical things I find useful. Also, random ramblings and rants.