What's the best way to upgrade Visual Studio Code on Ubuntu?
For the time being, I was periodically getting the newest version (.deb) from their official site:
sudo dpkg -i code_*.deb
What's the best way to upgrade Visual Studio Code on Ubuntu?
For the time being, I was periodically getting the newest version (.deb) from their official site:
sudo dpkg -i code_*.deb
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
sudo add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main "
to avoid getting a unsupported architecture message. –
Divan download the latest Visual Studio Code (.deb) package to your computer on this link:
https://go.microsoft.com/fwlink/?LinkID=760868
, or this there: Getting Started
then open a terminal in the folder where you downloaded the .deb file and write:
sudo dpkg -i <the downloaded file>.deb
finally, if you have apt-get, do (if not, install apt-get first):
sudo apt-get install -f
If you have installed it via the repository, exit Visual Studio Code, and 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.
This works fine in Ubuntu:
sudo apt-get update
sudo apt-get install code
When you install Visual Studio Code with the file .deb on Ubuntu 20.08, first, remove it:
sudo apt-get remove code
Add the repository in this link https://code.visualstudio.com/docs/setup/linux
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
Udate the package cache and reinstall
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code
In the next time when you want to upgrade, just do:
sudo apt-get update
sudo apt-get upgrade code
Because your repository is missing information to upgrade Visual Studio Code, the above solution will fix it.
This is what I did to avoid the annoying message:
Remove Visual Studio Code, if you already installed it.
sudo apt-get remove code
Add repositories, update and install:
sudo add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main "
sudo apt update
sudo apt -y install code
The following commands work for me (for Linux):
wget 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb
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.
build=stable
? Would it also work for those? –
Eberhardt build=stable
? insider
? monthly
? weekly
? Would it also work for those? Where is the documentation for those parameters? The answer could be extended with some of this information. Download Visual Studio Code Insiders. What are the differences between Visual Studio Code and Visual Studio Code Insider? –
Eberhardt I'm running Ubuntu 20.04 (Focal Fossa), and this worked perfectly for me:
wget https://vscode-update.azurewebsites.net/latest/linux-deb-x64/stable -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb
If you have already installed Visual Studio Code, go to the terminal and type two different commands:
sudo apt update
sudo apt-get upgrade code
The best way to update Visual Studio Code in Ubuntu:
sudo apt-get update
sudo apt-get install code
I'm using Kali Linux and this option worked for me:
sudo apt update
sudo apt-get upgrade code
© 2022 - 2024 — McMap. All rights reserved.
sudo apt-get install
the following additional packages:software-properties-common apt-transport-https
– Miserable