"Don't use Snap", you say? I'll do you one better! Skip Ubuntu. 'Just' use anything else more suitable. Debian is an excellent replacement being upstream, but I hold no illusions over undeclared requirements.
With 24.04 at least, doing an 'apt purge snapd' seems to be quite useful. Is that not sufficient?
For servers, this may not be a problem for us. Currently on 24.04, so will have to see how things are ≥25.10.
* https://packages.ubuntu.com/search?keywords=frr
in addition to a Snap:
* https://snapcraft.io/install/frr/ubuntu
Doing a quick test on 24.04: on a system without snapd installed, `apt install frr` installs packages and not any Snap stuff. Will have to see about 26.04 when I get a moment.
How about the inverse, purging? At one point, removing Snap would lose BGP announcements [through the loss of the 'frr' software/service it was managing].
Anyway, I'm willing to believe most of my install/dependency-resolution pain was inspired by [and limited to] 18.04 or whatever was immediately after. We had a fleet of systems inadvertently moved to Snap, only learned through a loss of announcements on removal.
edit: Tested on a 24.04 box I had laying around; removing Snap does indeed still rip out things one might want:
$ sudo apt purge snapd
[...]
Stopping snap.frr.ripngd.service
Stopping unit snap.frr.ripngd.service
[...]
Stopping snap.frr.zebra.service
Likely fine in your case, where if memory serves, you're removing Snap in the image/provisioning stage. Cooks in busy kitchens may still be surprised, however. The real problem appears solved: 'you' get the software 'you' asked for.For the moment, later pulling a package that is redirected would undo that effort. As the peer points out, too, that would likely rip out stuff you're using without having already configured preference.
One could maintain a boundless list of configs pinning repository preferences... or they could use a distribution that doesn't have a predisposition towards Snap.
A packaging system should not break the basic abstractions of an OS.