Ubuntu Server 18.04 – Understanding the differences between Debian and Snap packages

How to install and use docker on ubuntu 18.04

Now, before we actually get into the ins and outs of managing packages, there’s actually two completely different types of packages available to you, and you should understand the differences between them. As of the time this tutorial has gone to press, we’re at a kind of crossroads regarding the way in which software is managed in Linux.

Traditionally, each distribution has their own package format, and their own utilities to manage them. Nowadays, there’s a push to adopt a single package format that each distribution can install. Contenders for this single package format include Flatpak, AppImage, and Snap packages. Specific to Ubuntu, it utilizes Debian packages (with package names ending in .deb) as the main package format, which Ubuntu inherits from the Debian distribution (Ubuntu is forked from Debian).

Debian packages are basically what you’ve been installing throughout the tutorial. At no point (yet) have we installed anything else, unless you’ve read ahead. Debian packages have been the main type of package in Ubuntu for the entire existence of the distribution so far. When you search online for how to install something in Ubuntu, chances are, you’re going to be installing a Debian package. These packages are known as Debian packages because Ubuntu is built from Debian sources, and utilizes the same commands in order to install these packages. So even though Ubuntu is not Debian (Debian is a completely different distribution) they both use the same package format primarily.

Debian packages present some challenges and major cons, though. First, the entire distribution is made up of Debian packages. This means that the Linux kernel, system packages, libraries, and security updates are all Debian packages. When you install Ubuntu Server, it installs these packages during the process. When you install security updates, Debian packages are being installed. The reason this may be a problem is that other software you’ll be installing, such as Apache, MariaDB, and so on, are also Debian packages and may conflict with the system packages. Hypothetically, if a system library gets corrupted, literally every piece of software that depends on it will fail. Ubuntu developers pay a great deal of attention to this, so you shouldn’t run into issues. But the truth is, this is a lot of work for the maintainers of Ubuntu to deal with.

Another issue with Debian packages is software availability. When a new version of a package is released, it generally will not be offered to you until the next release of the distribution. This means that if you want a version of PHP, Apache, or some other piece of software that’s newer than what your current release of Ubuntu features, you generally will not have it offered to you. Instead, you typically wait until the next release of the entire distribution. There are some exceptions to this, such as Firefox in the desktop version of Ubuntu. The developers can make exceptions, but they usually don’t. If you ask me, having to wait for the next release of your operating system in order to have a newer version of your favorite software is just silly. After all, you don’t have to install a new version of Windows or macOS just to install newer applications!

Canonical, the makers of Ubuntu, understand these pain points and have been making a great effort to change how packages are managed. In fact, they actually came up with an entirely new type of package—the Snap package. Snap packages (or more simply, Snaps) have no impact on the underlying Debian packages at all and are completely separate. This is great, because there will not be a situation in which you update a Snap package and it conflicts with your system packages. This also allows you to have a newer version of an application than what would otherwise be made available. Since Snaps are separate from the underlying Debian packages, there’s no reason to withhold them. Snap packages are better in just about every way and are a great concept. The only downside might be that they are larger packages, since they include not only the application itself but also all the libraries it requires in one single package. However, they’re really not that large and shouldn’t cause an issue with disk space. These packages are no bigger than a typical application on macOS or Microsoft Windows.

So, which should you choose? Normally, I would definitely lean toward Snaps, but you don’t always have a choice. The reason being, Snaps are a new concept and not all developers have migrated their software to Snaps just yet. The majority of the packages you’ll install throughout this tutorial are Debian packages, mainly because that’s just what’s available right now. As time goes on, it’s expected that the number of applications available in the Snap format will grow. But as a rule of thumb, try out the Snap version first, and fall back to the standard Debian packages if you need to or if what you’re trying to install isn’t available in Snap format yet.

Comments are closed.