Hi, I am using Visual Studio Code as snap but it continues to tell me that a new version is available. I confirmed in the web the last version in 1.66.2 but the current snap version my system has is 1.65.0
sudo snap refresh code and it says
snap "code" has no updates available
The snap site shows the last version as “dfd34e82” published 12 April 2022…
There’s nothing we can do about this. Visual Studio Code is packaged by Microsoft directly. We have zero involvement. Please contact them via the contact details in the store listing (use
snap info code or the Software Centre to discover this):
$ snap info code
summary: Code editing. Redefined.
publisher: Visual Studio Code (vscode✓)
Ok, so Microsoft has to package the updated version in snap… Thank you!
Are you sure, also, that you’re not running an alternative package of VSCode?
My own installation via Snap correctly shows as up to date with the more recent version number you indicated in your original post. It might be that you have a different VSCode Snap than the official Microsoft one (the Snapcrafters community used to maintain one under the name
vscode but we disabled it once Microsoft published their own), or you might have it installed via an OS package (RPM or DEB or …).
Edit: tell a lie, it is me that has it installed via deb package and not snap ;-p
I also see version "dfd34e82” published 12 April 2022, but are you sure that’s out of date? I’m seeing
$ code --version
And 12 Apr was the date the two bugs that were fixed in 1.66.2 were closed.
This is the result in my system:
$ code --version
I can confirm the snap package installed:
$ snap list grep code
Name Version Rev Tracking Publisher Notes
code dfd34e82 94 latest/stable vscode✓ classic
Odd. My only guess is that you haven’t closed and reopened VS Code since then? (Or restarted your computer…) Since snaps auto-update, unless you have turned on refresh awareness, it will update while the app is open, but you’ll still be running the old app.
It turns out that I has 2 installations, one with snap and the other in /usr/bin. Evidently I was ussing the /usr/bin version and snap was updating correctly. Now I removed all and installed from snap and I have the last version OK!
Uninstalled the usr/bin with the following command (just in case it helps others):
sudo apt remove code
After that, I have to run code with
snap run code or
code no longuer works. I verified the
$PATH and it has /snap/bin in it (2 times):
$ echo $PATH
Anybody knows how to run code with just
code . from a project path now?
EDIT: just restarted Ubuntu and it works great now!
For any time in the future where you install or uninstall an app that you have available via a different path like here where you had
/usr/bin/code taking precedence over
/snap/bin/code when you type
code in your terminal, you should be able to (at least in bash) run the inbuilt command
rehash after you move the
/usr/bin/code out of the way e.g. by uninstalling the app via apt). Some other shells might have the equivalent to rehash as
@lucyllewy thank you, good to know that!