60

I have a snap package installed and I would like to run a previous version of it temporarily to test something.

I can see several versions of this package is installed in /var/lib/snapd/snaps/

Is there a simple (possibly one liner) command to run the previous version?

1 Answer 1

103
  • List installed versions in your system:
    $ snap list intellij-idea-ultimate  --all
    
    Name                    Version   Rev  Tracking       Publisher   Notes
    intellij-idea-ultimate  2019.3.4  212  latest/stable  jetbrains✓  disabled,classic
    intellij-idea-ultimate  2020.1    216  latest/stable  jetbrains✓  classic
    
    
  • Revert to a previous one:
    sudo snap revert intellij-idea-ultimate
    
  • Revert to a specific revision:
    sudo snap revert intellij-idea-ultimate --revision 212
    

Source: https://www.youtube.com/watch?v=D_tXAWGsys8&ab_channel=Lazo00100001

9
  • Thanks a lot, very good explanation.
    – Wojtas.Zet
    Commented Jan 4, 2021 at 10:39
  • 4
    Does reverting also disable auto-update for that snap? Or does it only skip the current version until the next update?
    – Sarke
    Commented Dec 3, 2021 at 2:07
  • 2
    It skips the version only until the next system update. I reverted a snap to a previous version and after some time a sudo apt update && sudo apt upgrade automatically installed the latest available version. I was keeping an eye out but didn't even noticed it.
    – tnagy.adam
    Commented Jan 17, 2022 at 10:16
  • 2
    1. Does the snap-system actually keep older versions? - Yes. More info: askubuntu.com/questions/1105878/… 2. Is there a way to see what's remote? - Not from command line (at the time of writing). Use snap info <program_name> then go to the url which is found in the contact section. Go to "Overview" (top left), then click "View full publishing history" (top right). Example: launchpad.net/ubuntu/+source/chromium-browser/…
    – tnagy.adam
    Commented Jun 13, 2022 at 14:30
  • 1
    After revert, you can freeze updates via command sudo snap refresh --hold <app> Commented May 2 at 19:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .