Snap automatic updates can now be disabled with $ sudo snap refresh --hold
.
This can be seen in this other thread and this blog post and from the mouth of the horse itself.
My Ubuntu 22.04 is up to date but I get an error when running the command. Any idea why?
$ sudo apt update
...
All packages are up to date.
$ sudo snap refresh
All snaps up to date.
$ sudo snap refresh --hold
error: unknown flag `hold'
Quoting from the third link in your question:
Searching around a bit, The snapd roadmap indicates that the
refresh --hold
feature was added in version 2.58. Meanwhile, Ubuntu 22.04 currently provides 2.56 at the latest:So, your version simply doesn't support the feature.
In Ubuntu 22.10:
So, even Ubuntu 22.10 does not have this option.
or if you don't have snapd installed as a snap:
And after that --hold and --unhold flags will be at your service!