What’s the Best Way to Update VS Code on Ubuntu?

February 3, 2026 3 answers
Asked by beyond the baseline
I keep getting prompts on Visual Studio Code to update, but when I select 'update', it takes me to a download page instead. I've tried the usual 'sudo apt update', but that doesn't show anything for VS Code. I found a guide that suggests adding the Microsoft GPG key and repo, but that command hangs in the terminal, leaving me confused. I installed VS Code using a .deb file initially, and I'm wondering why updating is so complicated. Can someone break down the best way to update VS Code on my Ubuntu setup?

Answers

isobar.1012
Updating VS Code really depends on how you installed it initially. Did you use the .deb, the app store, or some other method? If you used the .deb, it should be straightforward, but if it doesn’t work, it can be frustrating. Just make sure to check that the repo is correctly set up in your system.
Reply to this answer
draft horse grooming
It sounds like the .deb file you used should have set up the repo for VS Code, which would allow you to update it with 'apt update'. Sometimes that step can be skipped. If you're having issues with adding the GPG key, you'll need to troubleshoot that; if it hangs, it’s not ideal. Alternatively, you could consider purging VS Code and reinstalling it using the .deb file to see if that fixes your issue.
Reply to this answer
cactus..care
Here's a tip: always include your distro information and any error messages when asking tech questions! Debugging is easier with those details. Have you checked the documentation for your specific installation method? Sometimes the info can be buried in there.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions