Skip to content
Log In Sign Up info@muvcloud.com

The Short Answer

apt installs .deb packages that your distribution builds and tests for its release; they share system libraries and change only when you update. A snap is a self-contained package published by the software's developer through the Snap Store; it carries its own libraries, runs confined, and refreshes itself in the background.

How Each One Works

  • apt: downloads packages from the distribution's repositories, installs their files across the system, such as /usr/bin and /etc, and uses the libraries already installed. Versions stay fixed for the life of the release, apart from security and bug fixes.
  • snap: the snapd daemon downloads a compressed, read-only image and mounts it under /snap. The developer picks the version for each channel, such as stable or edge, and snapd follows the channel you chose.

Side by Side

apt (deb)snap
Built byThe distributionThe developer
LibrariesSharedBundled
UpdatesWhen apt runsAutomatic
VersionsFixed per releasePer channel
IsolationNone by defaultConfinement
Disk useSmallerLarger

Where Each Is Available

Ubuntu Server installs snapd by default, next to apt. Debian does not: apt is its only package tool until you run sudo apt install snapd. On AlmaLinux and Rocky Linux, snapd comes from the EPEL repository. apt itself exists only on the Debian family; see apt vs apt-get for its two front ends.

Everyday Commands

Taskaptsnap
List installedapt list --installedsnap list
Searchapt search namesnap find name
Detailsapt show namesnap info name
Installsudo apt install namesudo snap install name
Updatesudo apt upgradesudo snap refresh
Removesudo apt remove namesudo snap remove name

Automatic Refresh and How to Hold It

snapd checks for new revisions several times a day and installs them by itself, restarting the snap's services. On a server you may want to choose when that happens:

snap refresh --time
sudo snap set system refresh.timer=sun,03:00-05:00
sudo snap refresh --hold=72h certbot
snap changes

The first line shows the schedule, the second moves refreshes to a Sunday night window, the third holds one snap for three days, and the last lists recent changes. If a refresh breaks something, sudo snap revert with the snap's name returns to the previous revision. apt packages change only when you or a timer run apt; see sudo apt update and automatic security updates.

Confinement

Most snaps use strict confinement: they can reach only their own data and the system resources granted to them through interfaces, which snap connections lists. A strictly confined snap may be unable to read files in other directories. Snaps marked classic in the Notes column of snap list run without confinement, like a normal package.

Disk Use and Loop Devices

Each installed snap revision is a file under /var/lib/snapd/snaps, mounted through a loop device. That is why lsblk on Ubuntu shows entries named loop0, loop1, and so on: they are snaps, not disks. snapd also keeps older revisions so it can revert. To see them and remove one you no longer need:

snap list --all
sudo snap remove certbot --revision=REVISION_NUMBER

Rows marked disabled are old revisions. Reading the real disks is covered in how to list disks in Linux.

Server Tools Often Installed as Snaps

On Ubuntu, LXD and MicroK8s are distributed as snaps, and the Certbot project recommends its snap for most users. Certbot is also available as an apt package on Debian and Ubuntu; either way works with Certbot for Nginx. Install a tool one way only, and remove the apt copy before you install the snap: two copies give you two binaries in different paths and two renewal schedules.

Choosing on a Server

  • Use apt for the parts of the system itself: web server, database, PHP, and everything your distribution's security team patches.
  • Use a snap when the developer publishes it as the main way to install, or when you need a newer version than your release has and accept automatic refreshes.
  • Set a refresh window for snaps that run a service.
  • Before removing snapd: check snap list first, because removing snapd also removes every snap on the server.

Updated:

Linux VPS with Full Root Access

MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.

Cloud VPS Plans Starting at2.99 $/mo Cheap Linux VPS

No Limits on Service or Support

You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

Support specialist
  • 100% customer satisfaction goal
  • Our own hardware
  • 24/7 ticket and email support
  • 4 countries with locations