How do we disable the snap stuff
Robbi Nespu
robbinespu at gmail.com
Fri Jul 30 00:51:28 UTC 2021
On 7/24/21 6:13 PM, Bret Busby wrote:
> Upon booting one of my systems; UbuntuMATE 21.04, it immediately
> starting downloading megabytes of stuff.
>
> Upon checking, it was automatically downloading unknown upgrade stuff.
That is called as "snap refresh", yes..it do auto-run and download the
newer snap stuff itself and there is many people complaint about it, it
not just you.
>
> The settings in the "Software and Updates" application had been
> changed by the software - against my will - so that, for "When there
> are security updates", instead of the option "Display immediately",
> the software had changed the setting to "Download and install
> immediately". So, I immediately severed the Internet connection,
> changed the setting back to what it should have been, according to my
> choices, closed the application, to save the setting change, and,
> restored the Internet connection.
>
> Upon restoring the Internet connection, the massive downloading
> resumed, so, I opened the "Software and Updates" application again,
> and, noticed that it has a line of text "Snap packages are checked
> automatically and installed automatically."
>
Not sure about GUI package manager... but on my last experience, there
is no snapd control / options to configure snapd, so you must use cli to
tune it.
> As this snap stuff can not be trusted to not make unauthorised
> changes, and, cannot be trusted to not sabotage the system operation
> (this unauthorised snap interference probably explains the error
> messages that I have been getting, about incomplete and partial
> upgrades and resultant systems instability across my systems), how do
> we disable this malicious snap thing?
>
Someone maybe disagreed but it designed to work like that. That why most
there is a discussion that said snapd is against GNU philosophy[1]
that said:
> With free software, the users control the program, both individually and collectively. So they control what their computers do (assuming those computers are loyal and do what the users' programs tell them to do).
>
> With proprietary software, the program controls the users, and some other entity (the developer or “owner”) controls the program. So the proprietary program gives its developer power over its users. That is unjust in itself; moreover, it tempts the developer to mistreat the users in other ways.
It look bad but it unbalanced to said so, because snapd advantage and
the main reason to choose snapd over APT is because of:
- #1 snapd offer latest XYZ packages compared to traditional deb which
maybe take time to release or it not maintained anymore. Therefore, Snap
is the better solution for users who prefer the newest app versions.
- #2 some distribution have strict deb package release (official), so
compiling and package it by yourself is quite harder but snapd offer
easy way to package it.
-#3 releated to point #2, snap provide an easy way to install software
on any Linux distribution, so it compatible between various distribution.
and more-and-more reason why you have options to use snapd.. my
suggestion, just use package from APT and if you really need it then you
can use snapd (as long you know the drawback of snapd, but most people
don't know)
I not sure if Ubuntu comes with snapd installed and some packages comes
from snapd be default (I use Debian BTW) but I assume no snapd install
by default, so after you installed it..you need to take care it if you
still have reason to use it. Else you can purge it (instead of disable
it).. so my suggestion is to configure and tune it.
For me, I need to taking care it because of the network usage and disk
storage usage. Internet speed and bandwidth here (Malaysia) are still
bad, limited and controlled by ISP too much.. and my disk storage on my
SSD are so small.
Ok, first take a look on the timer
$ snap refresh --time
timer: 00:00~24:00/4
last: today at 00:41 +08
next: today at 08:18 +08
By default, the snap system is scheduled to refresh four times per day
(it said "/4" there)
Then, let see what already happen previously behind my back...
$ snap changes
ID Status Spawn Ready Summary
116 Done yesterday at 11:26 +08 yesterday at 11:26 +08
Auto-refresh snap "snapd"
117 Done today at 00:41 +08 today at 00:42 +08
Auto-refresh snap "gitkraken"
$ snap change 117
Status Spawn Ready Summary
Done today at 00:41 +08 today at 00:41 +08 Ensure prerequisites for
"gitkraken" are available
Done today at 00:41 +08 today at 00:42 +08 Download snap
"gitkraken" (180) from channel "latest/stable"
Done today at 00:41 +08 today at 00:42 +08 Fetch and check
assertions for snap "gitkraken" (180)
Done today at 00:41 +08 today at 00:42 +08 Mount snap "gitkraken" (180)
Done today at 00:41 +08 today at 00:42 +08 Run pre-refresh hook of
"gitkraken" snap if present
Done today at 00:41 +08 today at 00:42 +08 Stop snap "gitkraken"
services
Done today at 00:41 +08 today at 00:42 +08 Remove aliases for snap
"gitkraken"
Done today at 00:41 +08 today at 00:42 +08 Make current revision
for snap "gitkraken" unavailable
Done today at 00:41 +08 today at 00:42 +08 Copy snap "gitkraken" data
Done today at 00:41 +08 today at 00:42 +08 Setup snap "gitkraken"
(180) security profiles
Done today at 00:41 +08 today at 00:42 +08 Make snap "gitkraken"
(180) available to the system
Done today at 00:41 +08 today at 00:42 +08 Automatically connect
eligible plugs and slots of snap "gitkraken"
Done today at 00:41 +08 today at 00:42 +08 Set automatic aliases
for snap "gitkraken"
Done today at 00:41 +08 today at 00:42 +08 Setup snap "gitkraken"
aliases
Done today at 00:41 +08 today at 00:42 +08 Run post-refresh hook of
"gitkraken" snap if present
Done today at 00:41 +08 today at 00:42 +08 Start snap "gitkraken"
(180) services
Done today at 00:41 +08 today at 00:42 +08 Clean up "gitkraken"
(180) install
Done today at 00:41 +08 today at 00:42 +08 Run configure hook of
"gitkraken" snap if present
Done today at 00:41 +08 today at 00:42 +08 Run health check of
"gitkraken" snap
Done today at 00:41 +08 today at 00:42 +08 Consider re-refresh of
"gitkraken"
So..some stuff happen here. Let do something...
it better to put some control for metered network
$ sudo snap set system refresh.metered=hold
set the maximum number of a snap’s revisions stored by the system after
the next refresh, on my side (Debian) the numbers are already minimum
(2). the value should be from >=2 until 20 only.
$ sudo snap get system refresh.retain
2
you can set it using this command
$ sudo snap set system refresh.retain=2
I dont like the default timer (4 times a day and run at any time) so I
change it to execute refresh on last monday of the month at 23:00.. so
it update after 30 days
$ sudo snap set system refresh.timer=sun5,23:00
let verify changes..
$ snap refresh --time
timer: sun5,23:00
last: today at 00:41 +08
next: in 30 days, at 23:00 +08
$ sudo snap get system refresh
Key Value
refresh.metered hold
refresh.retain 2
refresh.timer sun5,23:00
Okeyy.. i think this is good setting for me. Additionally, I executed
"snap cleaner" as I attached here, once a while too.
Hope this helps...
[1] https://www.gnu.org/philosophy/free-software-even-more-important.en.html
--
Robbi Nespu <robbinespu AT SPAMFREE gmail DOT com>
D311 B5FF EEE6 0BE8 9C91 FA9E 0C81 FA30 3B3A 80BA
https://robbinespu.gitlab.io | https://mstdn.social/@robbinespu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snap_cleaner.sh
Type: application/x-shellscript
Size: 247 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20210730/a9ba1812/attachment.bin>
More information about the ubuntu-users
mailing list