Snapcraft remove older revisions

I have one of my snap packages released in Snapcraft which have several versions that I can check with snapcraft list-revisions <snap-name>:

Rev.    Uploaded              Arches    Version    Channels
60      2024-06-17T16:15:22Z  amd64     2.13.1     latest/stable*
59      2024-05-28T16:54:26Z  amd64     2.13.1     latest/stable
58      2024-03-13T03:47:14Z  amd64     2.13.1     latest/stable
57      2024-03-06T03:52:09Z  amd64     2.13.1     latest/stable
56      2024-02-15T04:24:41Z  amd64     2.13.1     latest/stable
55      2024-02-05T03:12:04Z  amd64     2.13.1     latest/stable
54      2024-01-14T15:35:57Z  amd64     2.13.1     latest/stable
53      2023-12-01T12:51:50Z  amd64     2.13.1     latest/stable
52      2023-11-19T14:09:49Z  amd64     2.13.1     latest/stable
51      2023-09-24T13:24:42Z  amd64     2.13.1     latest/stable
50      2023-08-13T19:03:54Z  amd64     2.13.1     latest/stable
49      2023-07-30T14:55:19Z  amd64     2.13.1     latest/stable
48      2023-06-23T04:30:08Z  amd64     2.13.1     latest/stable
47      2023-06-18T14:34:34Z  amd64     2.13.1     latest/stable
46      2023-05-13T06:35:56Z  amd64     2.13.1     latest/stable

Is it possible to remove all or some of the previous revisions so that the user won’t be able to install that revision of Snap? For example, I want the user to be able to install only the revision 60 of the snap. How do I do that?

1 Like

It hasn’t been possible for end users to access older revisions until relatively quite recently. It’s the kind of thing where a lot of the regulars would believe you can’t!

It has changed recently, so long as a snap revision was on “stable” one, any user who knows its revision ID can now download it, but this genuinely has only been the case for 12 months and probably less.

I don’t think you’d be able to control this on your side. It’d be worth moving this to the store or store-requests categories (probably store for now, this might be an unactionable request) so the team can provide input on whether they can override this to the older behaviour for you.

But in general, I’d expect 99.9% of your users simply do not know you can.