Snap is a solution that is preinstalled on more and more Linux distributions, and if like me, you are familiar with APT, you might wonder if you should switch to Snap and why. The goal of this article is exactly this, you’ll discover the real differences between APT and SNAP, and which one you should be using.
As a whole, SNAP is a command to install an archive of a software, released by the developers, in a tested container, isolated from the system. APT is a command used to install a specific package from the distribution repository, that will automatically install any required dependencies.
In this article, I will explain everything about these two solutions to install a new application: how it works, support, performances, usage, etc. Keep reading to learn which one you should be using.
Snap vs Apt: Distribution support
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!
Snap and Apt are supported on most Linux distributions, so in general you have the choice to either.
Snap is preinstalled on distributions like Ubuntu, Manjaro and Zorin OS. It can be installed easily on the other main distributions: Debian, Arch, Fedora, OpenSuse and theirs derivatives distribution (for example Raspberry Pi OS, based on Debian, is supported).
If it’s not already installed on your system, you can install the snap daemon with:
sudo apt install snap
Obviously, this is for Debian-based distributions, adapt it to use another package manager if needed (dnf, pacman, etc.).
You can also do this with the graphical interface, if you have a package manager GUI:
Then it’s recommended to reboot your system and install the “core” snap:
sudo snap install core
You can then use the snap command to install any application:
sudo snap install <appname>
We’ll talk about this later, but you can already see it on this screenshot. If you are on an “exotic” architecture (like a Raspberry Pi), not all applications will be available for you with snap.
Apt is preinstalled on any distribution based on Debian. Other distributions use a similar system, so even if you use a Red Hat or Arch Linux based system, you can follow this article to understand the differences between the traditional package manager and snap.
The commands to use apt are similar to snap:
- Update the packages catalog:
sudo apt update
- Upgrade the installed packages:
sudo apt upgrade
- Install a new package:
sudo apt install <packagename>
It will automatically install any required dependency if available in the repository.
A bit lost in the Linux command line? Check this article first, which will give you the most important commands to remember, and a free downloadable cheat sheet so you can have the commands at your fingertips.
Snap vs Apt: How it Works?
The main difference between Snap and Apt is that apt will install an individual package on the system, while Snap will download a whole archive, with all the prerequisites inside, and install it in a confined folder that is isolated from the system.
When you install an application with Snap, you download the exact archive created by the developers for your architecture. It has been tested in the same conditions and includes all of the dependencies. This archive will be extracted in a confined space (it’s similar to Docker apps in some ways) and has limited access to the operating system.
Developers like to use Snap because they can control the installation environment. There are fewer conflicts with other apps or various dependency versions. If it works for the developers, it should work on your system the same way. They can also be faster to deploy updates, as they don’t need to wait for the distribution to validate their updates (which can take a long time, especially on systems like Debian where stability is key).
On the other hand, when you use Apt, you download one specific package. It may add dependencies automatically, but only if you don’t already have them installed on your system. Also, even if the distribution validation for the updates can delay their availability, you may be more confident to install them, as a third-party (the repository maintainer) has checked the update code before making the package available for your system.
Where to find Snap or Apt applications?
Snap and Apt are not distributed through the same methods. Linux distribution has repositories you can access with the apt command, while Snap applications are available from the Snap store.
If you want to use snap, you can either try to install the application with the command we have seen previously, or browse the Snap Store to make sure it’s available. Distributions that have Snap preinstalled generally have a graphical interface to download Snaps directly from there. Here is an example:
I think it’s much easier for beginners on Linux. We are used to stores on our smartphones, and it works the same way. In each category, you’ll find a few apps you can install in one click. No need to use command lines, no risk to have issues with dependencies.
If you don’t have this application installed on your system, you can try to install the snap-store package with your package manager, for example:
sudo apt install snap-store
The other advantage of using this app instead of the website is that it will filter the packages available on your system. It’s not a big deal on a standard computer, but for Raspberry Pi users it will avoid many disappointments (as most apps are not available for ARM).
I suppose you already know this, but on the opposite, apt or any other package manager is always built-in to your system. On Debian based systems, you can use tools like Synaptic to find and install packages in a graphical interface, or just use the commands lines if you know them (I gave them at the beginning of this post).
One problem with APT is the number of results you’ll get for each request. For example, if you do a search for “Thunderbird”, you’ll get the main app package, but also all of the locales, all of the packages related to Thunderbird, etc. That’s why I like the Snap approach for beginners. Most people shouldn’t have to worry about the dependencies (like locales) and it just gives them the main results (that’s what Snap does).
Snap vs Apt: Performances comparison
After the installation and the first run, there is no difference in performances between applications installed with Snap or Apt. But snap archives are way bigger as they include all the dependencies (even if you already have them), so the download and first run will take longer.
This is a main advantage for APT if you have a limited disk space (like an SD card on Raspberry Pi) or a bad Internet connection. Packages are smaller, and you install the dependencies only once.
In other cases, it’s not a big deal. To give you an example, I tried to install Thunderbird with both methods. The package is 59M, while the Snap archive is 76M. This isn’t a huge difference, even with a limited space or bad connection, but overtime, as you install more and more applications it might become important.
Snap vs Apt: Updates management
Snap and Apt don’t handle updates the same way. Snaps updates are checked automatically 4 times a day and updated as soon as there is a new version available. With Apt, the system administrator keep the control on the update process.
With Snap, this page on the official documentation explains everything clearly. Snap is a daemon (remember the “d” at the end of “snapd”). So, it’s a service that runs all of the time and will regularly check for updates. You can delay this check a bit, but can’t avoid updating your apps. It’s perfect if you like to always have the latest version available installed on your sytem.
On the other hand, apt will give control to the end-user (or system administrator). You can enable automatic security updates (with unattended-upgrades for example) but in general, the application upgrade will only be done when you decide (by running apt upgrade or using the graphical equivalent).
Side note: it’s possible to have several versions of the same app installed with snaps. It’s not really useful for most users, but developers may like this option. For example, if you are developing extensions for Thunderbird, you can have the latest version installed and the latest beta, to check that your extension works on both before releasing it to everyone.
Is Snap or Apt safer for your system?
Snap and Apt use different security measures. While the advantage of Snap is to install a new app in a confined space, with less risk to damage your system, the advantage of Apt is the third-party validation by the repository maintainer.
So, if you trust the developers, Snap is probably safer, as there is less chance to create conflict, a dependencies mess or anything like this on your system. Each app is in a separate virtual partition, when you have a bunch of snap installed, it looks like this:
Apt will install new packages in their usual folders (in /etc or /opt for example). I love this because when you look for help in the online documentation, it’s this path that will be indicated. Snap is a bit messy when you need to debug something.
From a security standpoint, if you use the official repositories for your distribution, you should be safe. A bunch of developers from the distribution organization will review the code of each update, sometime test the app for a long time in a “beta” distribution, before releasing it. So, when it’s finally available with apt upgrade, it should be safe to install.
The update cycle is more or less long depending on your distribution (example: Ubuntu is fast, Debian is very slow), but overall, it’s safe enough to install once available. Obviously, if you are using third-party repositories or PPA, this note doesn’t apply, as the distribution has no control on these packages.
If security is a main concern, PPA and third-party repositories should be avoided. It’s the worst of both worlds: no validation and no container.
Snap vs Apt: Pros & cons
Pros and cons of using Snap
|Updates are available quickly.||Take more space on the disk.|
|Same environement as the developer.||Take longer to download.|
|Easier for beginners.||File locations are different.|
|Always up-to-date.||No way to control updates.|
|No traces on the system after removal.||Doesn’t work well on all distributions|
(ex: RPI OS snaps are not displayed in the main menu).
|No dependency issues.||Snaps are not available on all architectures.|
|Might be safer as the application is confined in a separate partition.|
Pros & cons of using Apt
|Better GUI integration overall.||It may be difficult to find the package to install.|
|Easier to follow the documetnation, as the files are located in the correct path (/etc, /var/log, etc.).||No updates once the distribution version is obsolete.|
|Might be safer as the application is verified by the distribution maintener.||A bit overwhelming for beginners / non-tech-savvy users.|
|The user has full control over the update process.|
Snap or Apt: Which one to use?
As a whole, snap is recommended for desktop users, especially beginners, who want an easy way to install applications and keep them up-to-date, while apt is generally better for advanced users on critical systems, that want to keep control of everything on the computer or server.
Sale: 10% off today.
Get the eBook.
Do more with your Raspberry Pi, learn the useful concepts and take the shortcuts.
You miss half of the fun of using a Raspberry Pi if you don’t know anything about Python.
At the end, it’s a personal choice. If you trust the developers, have a good connection, have enough disk space and want the latest version, Snap is probably perfect for you.
If the system stability is more important than having the latest version (especially for servers and work computers), and you want to be sure everything is tested and approved before updating the critical pieces of your system, Apt is probably a better choice.
If you are in the middle, you have to make a choice, or maybe test with less sensitive apps first and see how it goes. I find it’s a bit like choosing between Ubuntu and Debian. I may prefer to install Ubuntu on a beginner computer, as it’s easier to use, it has the latest apps versions, etc. But I will never install Ubuntu on a server as I’ve had too many bad experiences with it (upgrades messing up the whole system).
My personal choice is to use apt most of the time. The only exception is if the application I want is not available in the repository, but a snap is available. And I will only install a snap on a non-critical computer. On a server, for example, I will always install the app from source if not available in the repository. You don’t want an update to mess with the configuration, especially if you have many users for this app.
If you are on a Raspberry Pi, apt is still the best way to install new apps, as there are very few snaps available for ARM.
Snap and Apt FAQ
Grab your free PDF file with all the commands you need to know on Raspberry Pi!
Support us: Join the community on Patreon to show your support, get behind-the-scenes content and other awesome perks!
Raspberry Pi Resources
Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.
Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Download the e-book.
If you just want to hang out with me and show your support, you can also join the Patreon community. I share behind-the-scenes content there and give you early access to my content. You’ll also get a shoutout when you join.
More details here.
Need help to build something with Python?
Create, understand and improve any Python script for your Raspberry Pi.
Learn the essentials, step-by-step, without losing time understanding useless concepts.
Get the e-book now.
You can also find all my recommendations for tools and hardware on this page.