How to upgrade Visual Studio Code editor?

If you have installed it via the repository, exit VS Code then just do:

sudo apt update
sudo apt install code

This is the same command to install or upgrade to the latest version. You can see the version with:

code --version

Now the easiest and recommended way is to use snap:

sudo snap install --classic code

And updates are supposed to be automatic.


Visual Studio Code enabled official Linux repositories on February 2017 (v1.10)

sudo add-apt-repository -y "deb https://packages.microsoft.com/repos/vscode stable main "
sudo apt update
sudo apt -y install code

You can upgrade / dist-upgrade as usual

sudo apt -y upgrade
sudo apt -y dist-upgrade

[1]: download the latest vscode (.deb) package to your computer on this link :

https://go.microsoft.com/fwlink/?LinkID=760868

, or this there :
https://code.visualstudio.com/docs/

[2]: then open a terminal in the folder where you downloaded the .deb file and write:

sudo dpkg -i <the downloaded file>.deb

[3]: finally if you have apt-get do (if not install apt-get first):

sudo apt-get install -f

This works fine in ubuntu.

sudo apt-get update
sudo apt-get install code