Score:0

snap store vs apt and debian packeges

nf flag

I was wondering if I should prefer installing apps using apt and .deb files rather than getting them through the snap. I have heard that snap is safer than apt/.deb, but it's slower. What should I prefer?

Mahler avatar
in flag
The snapcraft.io website where snap packages are placed is intermittently slow.
Odysseus avatar
nf flag
So should I avoid snaps @Mahler?
Organic Marble avatar
us flag
We cannot tell you what to prefer. That is opinion-based. I personally don't like snaps, but that is just my opinion.
Mahler avatar
in flag
I use both .deb and snaps. Linux Mint works with .deb only, Ubuntu works with both types of packages.
Nmath avatar
ng flag
apt and snap will both install software that's compatible with your release, as long as you don't add unofficial or incompatible sources. Installing .deb files you downloaded from the internet is risky because they may not be supported by your release. In that way apt and snap are both "safe" ways to install software. .deb files are less so. PPAs are even less so.
user535733 avatar
cn flag
You should prefer both. Each has advantages and disadvantages, like every other minor choice in life (which bus to catch, which shoes to wear). Try both, and see if you have a preference. Both work great.
guiverc avatar
cn flag
There are *pros* & *cons* to anything, and the choice may depend on the machine (*resources available*), your use-case (*how important is security*) etc. and thus the choice I make in one circumstance is **not** the choice I'll make on another box for a different use-case. I consider how I'll use the *app* on the box it's to be installed on, & then decide which format will be best (*with the many pros & cons for each*) and it's not always the same choice. FYI: In operation, I've found *snap* browsers ~equal to *deb* browsers if you exclude time needed to get them operational (initial start)
Score:2
cn flag
raj

There are no definitive rules, we can only give you a few hints.

The main difference between snap and .deb packages is that snaps are sandboxed and self-contained, while .deb packages are not.

Sandboxed means isolated (to some extent) from the rest of the system; for example, snaps usually can't access files outside your home directory, unless specifically configured to do so. So you should install a snap version of the application if the application does a job that is relatively independent from the system as a whole - for example software for video editing or numerical calculations, or a game. Everything that is closely integrated with the system (for example a screenshot utility, or an alternative file manager) works best with .deb packages.

Self-contained means that a snap package contains everything that is needed to run the application - not only the application itself, but also all libraries it requires. These libraries may be in different (even conflicting) versions than the libraries already present on your system. With .deb packages it's not the case; usually the .deb package for an application contains only the application, and it depends on multiple other .deb packages containing the required libraries, which are installed separately (those other packages are commonly called "dependencies", and we often say that a .deb package "pulls in the dependencies" when installed). However, there is a single set of libraries installed via .deb packages which is used by all applications installed via .deb packages, and you cannot have two versions of a library that conflict with each other.

Because of these two things:

  1. snaps usually use more disk space than .deb packages
  2. snap applications may use more RAM than applications installed as .deb packages
  3. snap applications may have slower startup time than applications installed as .deb packages (the difference is only in startup time; once started, there's no difference in speed)
  4. when you uninstall a snap application, it is uninstalled together with all the libraries it has "pulled in"; when you uninstall a .deb application, all the dependencies it has "pulled in" remain installed; you can uninstall them manually, but you have to know how to identify them

Snaps also ensure that you always have the newest version of the application, while with .deb packages it may not be the case, especially with LTS Ubuntu releases (the versions of most applications are "frozen" at the moment the system is released and usually only security updates are provided - without new features - while the upstream application may already have progressed quite a few versions).

Personally I think that snaps are good to:

  1. test unknown software that you are not sure whether you want to use it or not; to be able to easily uninstall without messing up the system
  2. install an application that pulls in lots of dependencies that may be in conflict or unsupported on your current system; for example an application written for a different desktop environment (like installing a KDE application under GNOME)
  3. install a newer version of an application than the .deb version included in your Ubuntu release

Other than that, I would prefer .deb packages. But it's just my preference.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.