When using Ubuntu or any other Linux distro, you will often use a package manager to install, update, and manage any software package. Although APT (Advanced Package Tool) is the most commonly used Linux package manager; you will still find Snap on Ubuntu and other distros, creating the Snap vs APT face-off.
Whether you are a beginner Linux user or an enthusiast user, you are likely torn between Snap vs APT and seeking to learn more about them. We’ve clearly detailed the difference between the two package managers to help you understand what each offers. Let’s begin!
Overview of Snap vs APT
Snap is a recent package manager that comes pre-installed on Ubuntu and it became available starting with Ubuntu 16.04 LTS. Snap was developed by Canonical and has quickly become a favorite choice for installing snaps (packages) without any dependency errors.
You can check out our guide on Snap packages to learn more about installing, removing, and managing Snap packages.
The Snap package manager is not available only for Ubuntu. It is supported on Fedora, OpenSUSE, Manjaro, Arch Linux, Debian, and other distros. Therefore, even though you’ve been used to APT, there is no barrier to using Snap. Enough of Snap, let’s talk about APT.
The APT is a package manager supported by Debian-based distros for installing, removing, and managing packages. APT relies on the sources list to fetch packages, including updates. These source lists are available on the official repository of your Linux distro. To install a package/snap, you use the syntax below.
$ sudo snap install package_name
Here’s an example:
Besides, the repository may contain third-party supported packages that can be installed using APT. For instance, installing a package using APT follows either of the below syntax.
$ sudo apt install package_name
$ sudo apt-get install package_name
Here’s an example:
Snap vs APT: What’s the Difference?
Over the years, APT has been the go-to option for working with software packages. However, a new debate on Snap vs APT has begged the question of which is the better option.
Below are the key features of Ubuntu Snap vs APT.
1. Package Format
Under Snap, every software package is a .snap file available in the Snap Store. The .snap file comes bundled with all the dependencies required to install and run the application in a containerized fashion. Moreover, Snap relies on the Snapd, its daemon, to install packages. You must have Snapd installed.
However, APT has its files as .deb and are sourced from official and third-party online repositories. To install software, you can use the apt or apt-get command.
Another point on the Snap vs APT is that for APT, the .deb files are sourced as an archive containing all the necessary files for the installation. In contrast, the .snap files are available in a SquashFS compressed format.
2. Size and Dependencies
We can’t complete a Snap vs APT guide without mentioning their difference in size and dependencies. For Snap, all the dependencies are bundled in a containerized format, ensuring no cases of dependency errors. This bundling makes Snap packages larger, and the installation process takes longer.
As for APT, it follows a shared approach to the dependencies. When installing a package, APT will check the required dependencies. Next, it will compare them to those already installed on your system. Lastly, it will install the missing ones. Therefore, installing APT takes a shorter time as the file size is smaller.
3. Ease of Use and Updates
Snap is set to fetch updates automatically. Plus, the developers have an easy time making the updates. Besides, the updates are not system-specific, making Snaps easy to use.
In the case of APT, you must manually update the repository for APT to fetch any available updates. Again, the updates are different depending on the repository system of your Linux distro. This difference can cause inconvenience as the updates are released at different times for different distros.
4. Security
When installing software packages from the official repository, your security is guaranteed. Each .deb file is reviewed before being accessible. However, third-party repositories can be insecure.
For Snaps, each .snap file goes through signature validation, making them secure. The only bet is that you must trust the publisher of the Snap you wish to use, as external reviews and validation are not done.
What’s the Bottom Line?
Both Snap and APT are reliable package managers. In a Snap vs APT comparison, individual preferences matter. For someone who has been stuck in a dependency-missing error, Snap proves more reliable thanks to its packaging. However, APT has existed for a long time, and many users are comfortable using it.
The point is this: try both options and see which works better for you. Better yet, know how to use both package managers. Some instances will need you to use one over the other. Hopefully, this post has been insightful in comparing Snap vs APT.