Deb vs Snap – Which Method is Preferable for Installing Packages?

aptdebpackage-managementsnap

Of course for most packages the answer is trivial: if it's some tool or library, deb is the only option, while for some proprietary software snap is the only option.

It seems Ubuntu is heavily pushing and promoting Snap packages, citing advantages in packaging, isolation, security, updates, etc. yet all applications that ship with Ubuntu 18.04 are installed as deb packages.

One example is Firefox, which is a package that should be kept up-to-date for security reasons, and that in the past had conflicts with distribution package maintainers about security and branding (Iceweasel). Yet Canonical chose to ship Firefox as a deb package.

For packages that have both a snap and a deb, this raises the question: Which one should you install? And if the answer is snap, should I actively migrate installed deb's?

Best Answer

Generally speaking, I would say you should stay with DEB for most applications that rely on system libraries. This has the advantage that if you update this one library e.g. for security reasons, all applications using this library will benefit, even if the maintainer of the original application is unaware of the vulnerability.

SNAPS are good in cases where you are interested in updating particular applications without updating your entire system. E.g. you are on an LTS release, but want to have the newest version of a particular application. Compared to PPAs where the applications have to be compiled against the "old" system wide libraries, in a snap the applications bring their own libraries. This is easier for maintainers and may keep you from landing in dependency hell if you happen to otherwise use a lot of PPAs.

Related Question