18.04 – How to delete an aptly published snapshot

Using Ubuntu 18.04 and aptly version 1.4.0.

I am attempting to create a focal mirror using aptly, as follows:

aptly mirror create --architectures="amd64" -filter-with-deps -filter="Installed-Size (<=500000)" focal http://uk.archive.ubuntu.com/ubuntu focal main restricted universe multiverse
aptly mirror update focal
aptly snapshot create focal-latest from mirror focal
aptly publish snapshot --skip-signing focal-latest filesystem:export:export

This seemed to work OK — but I made a small mistake and want to delete the published snapshot and redo it.

How does one do this please? The command line help shows this:

Usage: aptly publish drop <distribution> ((<endpoint>:prefix)

I presume <distribution> is what aptly publish snapshot refers to as <name> but I have been unsuccessful divining the correct format to use. I have tried dozens of combinations, but here are a few, and the results:

$ aptly publish drop focal-latest
ERROR: unable to remove: published repo with storage:prefix/distribution ./focal-latest not found
$ aptly publish drop focal-latest filesystem:export:export
ERROR: unable to remove: published repo with storage:prefix/distribution filesystem:export:export/focal-latest not found
$ aptly publish drop focal-latest filesystem:export
ERROR: unable to remove: published repo with storage:prefix/distribution filesystem:export/focal-latest not found

apt – Perform (Ubuntu) do-release-upgrade using a local Aptly mirror (missing meta-release files)

Background

We currently have a local deb mirror setup using Aptly snapshots due to regulatory reasons (for example: servers are not allowed to fetch packages over the internet). All of this works just fine for normal upgrades. When we need to do a release upgrade (from Ubuntu 18.04 to 20.04) we can normally just replace the VM, but some servers require us to do an in-place release upgrade using our mirror.

Current state

We have configured /etc/update-manager/meta-release on our nodes to point to our mirror but of-course there is no meta-release and meta-release-lts files in our Aptly. If we then copy the official meta-release files to be served from our Aptly it still won’t work because it refers to a bunch of different external URLs, installers, documentations, etc. and even if we would change the URLs to point to our Aptly all those files would not be there. So we would need to be copy and serve those too.

Solution?

Do we need to parse the meta-release files, download all the installers, etc. serve them and generate our own meta-release files from that? There must be a simpler way of doing this! Do we have to build this from scratch or is there tooling available?

https://www.aptly.info/

PS. We are thinking of switching to Pulp 3 since Aptly seems to be partially abandoned, not that we know if that would help with the release upgrade issue.