Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 427  / 2 Years ago, mon, june 20, 2022, 4:53:52

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'

More From » updates

 Answers
6

Quoting from the third link in your question:



Refresh hold


The new hold feature allows system administrators and end users to
stop or postpone their snap updates for as long as necessary.



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:


$ apt policy snapd
snapd:
Installed: 2.56.2+22.04ubuntu1
Candidate: 2.56.2+22.04ubuntu1
Version table:
*** 2.56.2+22.04ubuntu1 500
500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.55.3+22.04 500
500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

So, your version simply doesn't support the feature.




In Ubuntu 22.10:


$ apt policy snapd
snapd:
Installed: 2.57.5+22.10ubuntu0.1
Candidate: 2.57.5+22.10ubuntu0.1
Version table:
*** 2.57.5+22.10ubuntu0.1 500
500 http://archive.ubuntu.com/ubuntu kinetic-updates/main amd64 Packages
500 http://archive.ubuntu.com/ubuntu kinetic-security/main amd64 Packages
100 /var/lib/dpkg/status
2.57.4+22.10ubuntu1 500
500 http://archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

So, even Ubuntu 22.10 does not have this option.


[#97] Monday, June 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ndeecru

Total Points: 109
Total Questions: 128
Total Answers: 117

Location: Czech Republic
Member since Thu, Aug 11, 2022
2 Years ago
ndeecru questions
Thu, Mar 10, 22, 18:53, 2 Years ago
Thu, Oct 14, 21, 20:53, 3 Years ago
Thu, Apr 28, 22, 10:16, 2 Years ago
;