1

I shifted to Ubuntu 20.04 LTS 3 weeks ago from Windows 10. I use Visual Studio Code and whenever I get an update in Update it shows in Settings > Download Update(1). When I click on download update, firefox opens up and then I have to download Visual Studio Code Setup from there and then I have to install it. This is what I have to do everytime. In Windows, I just had to click the Download Update button then the update would automatically be downloaded.

Please tell me if there is any way to update Visual Studio Code easily like using termianl?

Thanks in Advance

PS: Sorry for my bad English as it's not my native language, I may have committed some grammatical mistakes.

4 Answers4

3

After installing, you should have the following file: /etc/apt/sources.list.d/vscode.list with this content:

deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main

This will allow you to update it with apt

sudo apt update
sudo apt upgrade
rtaft
  • 1,920
1

To me, none of above solutions work

So, I try to reinstall via the deb file

And then my vscode is upgraded

Note:

  • I did not remove vscode before reinstall with deb file
  • My PC works with a corp proxy
ninoorta
  • 111
0

In my case it was not a straight forward upgrade. I tried to upgrade VS Code with the following commands

sudo apt install apt-transport-https
sudo apt update

and I got the following error

enter image description here

Then I used the following process to upgrade VS Code.

  • Downloaded the .deb file from website
  • Executed following command sudo dpkg -i <file>.deb & sudo apt-get install -f # Install dependencies
  • Executed the commands in the sequence sequence
  • 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,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
  • Then update the package cache and install the packages
  • $ sudo apt install apt-transport-https
  • $ sudo apt update
  • $ sudo apt install code # or code-insiders

and DONE.

Ref: https://code.visualstudio.com/docs/setup/linux

Final Screenshot
enter image description here

0

I've updated only VS Code, not all installed packages, by:

sudo apt update
sudo apt-get --only-upgrade install code