How to download specific Ubuntu versions (e.g. 22.04.1)

Hello all,
I’m wondering if there is a way to point to a very specific version of Ubuntu (e.g. 22.04.1 vs. 22.04.2) when downloading images. If not, is there at least a way to query or figure out which specific minor version a downloaded image is on?

Hi @mkgilbert and welcome to MAAS community.

There is no way to point to a very specific version and MAAS always tries to sync latest versions to be available for deployment.

However if your main goal is to have more control over deployed versions (e.g. to have reproducible deployments) and you don’t want to automagically deploy 22.04.03 once it is available in the upstream and synced by MAAS, I think that there are still couple options available.

  1. Use your own SimpleStreams as a custom mirror.
  2. Build custom Ubuntu image from desired version.

@troyanov, thank you for the warm welcome and helpful answer!
For using SimpleStreams, I get the impression from the documentation you linked to that it just mirrorrs what is currently on Do you know if SimpleStreams provides a way for me to be more picky about which version I’m downloading?

@mkgilbert yes, SimpleStreams will mirror data from but it is possible to control what you sync (also it will sync only when you ask it to sync)

From MAAS doc:

To know in advance what the sstream-mirror command will grab, or if you want to save bandwidth and time by avoiding bad selections, include the --dry-run option. When you are satisfied, remove that option to initiate the download.

I think the only way to check how filtering works is going through the codebase:

It seems to be possible to use Hooks as well.

= Hooks =
To use the “command hooks mirror” for invoking commands to synchronize, between
one source and another, see bin/sstream-sync.

So my idea is to try something like this:

  1. Setup a mirror that will sync with some filtering rules (or with some hook)
  2. Then for every version (20230325, 20221211, 20230324, etc) donwload the squashfs
  3. unsquashfs -f -d /tmp/foo squashfs and cat /tmp/foo/etc/lsb-release
  4. Remove unwanted versions from streams/v1/com.ubuntu.maas:stable:v3:download.json

Thats the only hack I can think of…

For the reference: is 22.04.1 LTS is 22.04.2 LTS

❯ unsquashfs -f -d /tmp/foo squashfs
❯ cat etc/lsb-release

Did a quick check (please note, I am skipping actual image download here on purpose, as well as skipping GPG signature verification):


Will produce the following:

❯ ll foo-mirror/streams/v1/

Downloaded com.ubuntu.maas:stable:v3:download.sjson is exact copy of

I think modifying the file by removing unwanted versions will do the trick


@troyanov, wow! You’re answers were so in depth and extremely helpful…I’m very grateful :grinning_face_with_smiling_eyes:

Something like that hack was exactly what I was looking for.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.