Malware and Snap

Just saw this on DistroWatch.com. Thought I'd share. Read on ...

Link: DistroWatch.com: Put the fun back into computing. Use Linux, BSD.

This has to do with malware having been found recently in Snap repositories.

I've heard the arguments for and against Snap packages. I'm "against."

No doubt this news will add credence to anti-Snap folks' arguments against it.

2 Likes

Reading this I am happy I made the choice to remove snap recently. It was easy thanks to the information from @Aravisian in this thread: Remove snap from Zorin

snap list

sudo rm -rf /var/cache/snapd

sudo apt-get remove --purge snapd

sudo apt autoremove
3 Likes

There's a much bigger issue:

Question: If I remove Snap, will this have the effect of removing all listed Snap software in the Software Center? Or will it still show up? If it will still show up, then ... what's the point? If it won't, then okay, great.

When You uninstall Snap you don't get anymore the Snap Version from the Software Store; that is right. You only see the Flatpak and .deb (Zorin) Versions.

P.S.: A Tip for the Uninstallation because @emit didn't wrote it. When you uninstall snapd uninstall the Snap Plugin too. Simply type sudo apt purge snapd gnome-software-plugin-snap

1 Like

Thank you very much.

1 Like

I think you misspelled "software."

So it should be:

sudo apt purge snapd gnome-software-plugin snap

Correct?

1 Like

Sorry. Yes it's software. I changed it. But before you uninstall it, it could be good to type first:

sudo systemctl stop snapd

sudo systemctl disable snapd

1 Like

OK. Before I do anything, I want to make sure of the sequence of commands I should enter. See below, please ...

sudo systemctl stop snapd

sudo systemctl disable snapd

snap list

sudo rm -rf /var/cache/snapd

sudo apt-get remove --purge snapd

sudo apt autoremove

sudo apt purge snapd gnome-software-plugin snap

Is this correct and the recommended way to do it? Thanks.

Not sure about the placement of the "snap list" command, though.

I personally don't use Snap (I stick with Flatpak and .deb files), so ... OK.

@Ponce-De-Leon @Aravisian

Probably be best to put "snap list" at the beginning ...

OK. New sequence:

snap list (if nothing; proceed - if there are snaps, remove them first)

sudo systemctl stop snapd

sudo systemctl disable snapd

sudo rm -rf /var/cache/snapd

sudo apt-get remove --purge snapd

sudo apt purge snapd gnome-software-plugin snap

sudo apt autoremove

Correct? Please advise. Thanks. @Ponce-De-Leon @Aravisian

You can control first if You have any Snap Versions installed, yes. On default there are no Snaps preinstalled. So, when You do this after a fresh Installation theoretically You don't need to do that or when You never installed a Snap Program. But when you want control it, then the Command would be the First:

snap list

After that comes:

sudo systemctl stop snapd

sudo systemctl disable snapd

I'm not totally sure, but when I remember right, the cache snap File should automatically deleted with the disable command. It should shown You in the Terminal. Only for Just-in-Case you can use the Command sudo rm -rf /var/cache/snapd

After that comes the Uninstallation:

sudo apt purge snapd gnome-software-plugin-snap

sudo apt autoremove

Or to make it short:

snap list

sudo systemctl stop snapd

sudo systemctl disable snapd

sudo apt purge snapd gnome-software-plugin-snap

sudo apt autoremove

Thanks. This is what I will use:

sudo systemctl stop snapd

sudo systemctl disable snapd

sudo rm -rf /var/cache/snapd

sudo apt-get remove --purge snapd

sudo apt purge snapd gnome-software-plugin-snapd

sudo apt autoremove

I got what you said about "disable" and "rm -rf" ...

... but I'll still include "rm -rf" and "purge snapd" ...

... just to be on the safe side and to be thorough ...

I will not include "snap list" because I don't have any.

I'll do it this way and report back shortly. Thanks again.

1 Like

UPDATE:

It worked. No problems. Rebooted the PC and no more snaps show up. Good riddance to snaps. Why'd they ever become a "thing" ... ? Crazy. The Zorin Group should consider getting rid of snaps in the software center. (But that's just me.)

2 Likes

Snap is a Development from Canonical - the Developer from Ubuntu. And they push it really hard. That is the Reason why I don't like it. I tried it in the Past but I found the Performance not really good. The Opening of A Program was slow and they didn't run smooth.

Linux Mint for Example banned Snap from her Distro. They only offer .deb and Flatpak.

2 Likes

The ZorinGroup does not include any Snaps in Zorin OS by default at this time, but does leave the framework in place so that the user may choose for themselves.

Controversy surrounds Snap. But some users may like it and may want to use it and that is their choice and their right to do on their own machine.
Personally, I agree with the ZorinGroups decision to not make the decision on behalf of the user.

4 Likes

Thank you for the information. I did not know I also might need to run:

sudo apt purge snapd gnome-software-plugin snap

However it seems it was not needed for me? Please note I have previous only run the commands listed in my first reply at the top in this thread. Here is output:

xxxx@emit:~$ sudo systemctl stop snapd
[sudo] password for xxxx:         
Failed to stop snapd.service: Unit snapd.service not loaded.
xxxx@emit:~$ sudo systemctl disable snapd
Failed to disable unit: Unit file snapd.service does not exist.
xxxx@emit:~$ sudo apt purge snapd gnome-software-plugin snap
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package gnome-software-plugin
xxxx@emit:~$

Edit: Could it be that the previous command I run last time removed the "gnome-software-plugin snap"? I mean this commend removed it previously?:

sudo apt autoremove

3 Likes

Correct.

2 Likes

You can easily look if snap is installed. Type in the Terminal apt list snapd and when there don't stand that it is installed, it is not installed. But Your Text look like that it is not installed.

For the Plugin I had made a big Mistake that I have corrected. There was a - missing. That is the Reason for:

So, it must be gnome-software-plugin-snap

When You type apt list gnome-software-plugin-snap You will see if it is still installed. If it is installed type sudo apt purge gnome-software-plugin-snap

Thank you very much. I have now run your edited command, but it still seems it is not installed. So I think I am good and that previous command "sudo apt autoremove" did take care of removing the plugin:

xxx@emit:~$ apt list gnome-software-plugin-snap
Listing... Done
gnome-software-plugin-snap/jammy 45.3-2ubuntu1+zorin1 amd64
N: There are 2 additional versions. Please use the '-a' switch to see them.
xxx@emit:~$ sudo apt purge gnome-software-plugin-snap
[sudo] password for xxxx:         
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'gnome-software-plugin-snap' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
xxx@emit:~$

Edit: But strange the "apt list" does find something? But maybe that is only from the download/repository. I think I am good.

1 Like