Snap install specific/old version

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:

  • How to install specific package version using snap?
  • Install specific previous version of package using snap?

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


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

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