28

I'm using VS code installed via snap. The latest version has an annoying bug in it and I want to revert to the previous version, but I don't see a way to tell snap to install a specific version. All I see with snap info are the different channels which all yield to the latest version. Also on the Snapcraft website I can't select another version.

In the snap docs it says that I could revert, but this doesn't work for me, as there is no prior version installed.

I can download a snap with the specific version from the VS code website, June 2020 (version 1.47), but I personally would prefer to handle this by snap directly.

There seem to be some people with the same problem, but I didn't find a working answer:

The question summed up is: Is there a possibility to revert to an older snap version and if yes, how to do that?

1
  • Snaps are designed to auto-update to the latest version by design (a lot of devs want their users on the latest version). They do provide users multiple channels including having multiple channel versions installed (a form of version selection, but it's still different).
    – guiverc
    Aug 20, 2020 at 6:44

3 Answers 3

25

For example, installing older version of blender:

sudo snap refresh blender --channel=2.92/stable

How do you know what is the channel value?

snap info blender

will give you something like this:

snap info blender       
name:      blender
summary:   Blender is the free and open source 3D creation suite.

BLA BLA BLA BLA BLA

channels:
  latest/stable:     2.93.5  2021-10-06 (830) 205MB classic
  latest/candidate:  2.93.1  2021-06-23 (206) 205MB classic
  latest/beta:       2.93.0  2021-06-01 (161) 205MB classic
  latest/edge:       ↑                              
  2.93lts/stable:    2.93.5  2021-10-06 (830) 205MB classic
  2.93lts/candidate: 2.93.6  2021-10-25 (935) 205MB classic
  2.93lts/beta:      ↑                              
  2.93lts/edge:      ↑                              
  2.92/stable:       2.92.0  2021-02-25 (111) 196MB classic
  2.92/candidate:    2.92.0  2021-04-21 (134) 173MB classic
  2.92/beta:         2.92.0  2021-02-17  (95) 197MB classic
  2.92/edge:         ↑                              
  2.91/stable:       2.91.2  2021-01-20  (65) 193MB classic
[...]

and here is the magic line:

2.92/stable:       2.92.0  2021-02-25 (111) 196MB classic
1
  • Unfortunately this only works if there happens to be a channel with an older version of the application. But this isn't the case for some applications (e.g. snap-store).
    – bmaupin
    Nov 29, 2022 at 13:50
7

You can install specific old version in snap that is not the problem. Take a look at this answer for detailed instructions.

Your real problem is that snap repo for Visual studio Code has no old versions, just one latest version:

snap info code
2
  • 1
    Ok, so if vs code would provide old versions, there would be other channels like i.e. "1.47/stable", "1.46/stable" etc.? Aug 20, 2020 at 7:01
  • Yes that is correct. Aug 27, 2020 at 10:46
7

While the other answers are correct in the fact that with snap refresh you can only install those specific versions offered in snap info, that is not what you are actually looking for.

The latest version has an annoying bug in it and I want to revert to the previous version

By default, snap keeps two previous versions of every package cached on your system. Thanks to that, the answer to your problem of returning the snap code to its previous working version is as simple as this:

snap revert code

You can also list all locally available revisions of a snap package and choose which of them to revert to, see this answer.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.