Methods of payment Abuse

How to Use Snap in Ubuntu 24.04

30.06.2025, 18:54

In Ubuntu 24.04, Snap is still a key part of how you install and manage software. It’s a flexible format that makes it easy to install apps, handle updates, switch between versions — and even remove Snap entirely if you want to. Here's a simple and practical guide to how it all works.

What is Snap and why use it?

Snap is a universal packaging format developed by Canonical. Each Snap package includes everything the app needs to run: executables, libraries, configuration files, and more. This means it can work across any Linux distribution without worrying about dependencies or version conflicts.

Snap is managed by a background service called snapd, which handles installation, updates, launching, and removal of packages. Snap files themselves (with a .snap extension) are mounted as read-only archives in the system.

User data is stored separately, under ~/snap/<app-name>/. That way, your settings and files remain intact even if you reinstall the app.
Of course, this convenience comes at a cost. Snap apps are usually larger, since they include everything they need — even if the same libraries are already in your system. Snap also keeps previous versions of apps for rollback, which takes up more space.

Installing Snap on Ubuntu 24.04

In most cases, Snap is already installed in Ubuntu 24.04. But if you’re using a minimal system, working inside a container, or built the system manually, you may need to install snapd yourself.

First, check if Snap is already available:

snap version

If the command isn’t recognized, install Snap with:

sudo apt update
sudo apt install snapd

Then make sure the Snap service is running:

sudo systemctl start snapd
sudo systemctl enable snapd
systemctl status snapd
systemctl status snapd.socket

If everything looks good, you’re ready to start using Snap.

Installing apps with Snap

The basic install command is:

sudo snap install <package-name>

To search for apps:

snap find <keyword>

For example, to install VLC:

sudo snap install vlc

Installing Visual Studio Code takes one extra flag:

sudo snap install code --classic

That --classic flag gives the app broader access to system files and paths — some programs won’t work without it.

Managing Snap apps

To see what Snap packages are installed:

snap list

Snap automatically updates apps in the background. To update everything manually:

sudo snap refresh

You can also set when updates are allowed:

sudo snap set system refresh.timer=mon,wed,fri,6:00-8:00

Or postpone updates for a week:

sudo snap refresh --hold=168h

Need to roll back to the previous version?

sudo snap revert <package-name>

To remove an app:

sudo snap remove <package-name>

To completely wipe it, including user dаta:

sudo snap remove --purge <package-name>

What to do if Snap isn’t working

Sometimes the snapd service can crash. To check its status:

systemctl status snapd

To restart it:

sudo systemctl restart snapd

Also make sure the socket is working:

systemctl status snapd.socket

If it’s inactive, turn it on:

sudo systemctl enable --now snapd.socket

Release channels: stable, beta, edge

Every Snap app comes in several versions:

— stable — the default release
— candidate — nearly ready for stable
— beta — for testing
— edge — bleeding-edge development builds

To install from a specific channel:

sudo snap install <package> --channel=beta

To switch to another channel later:

sudo snap refresh <package> --channel=stable

How to completely remove Snap

If you decide Snap’s not for you, start by removing all installed Snap apps:

snap list
sudo snap remove --purge <package-name>

Then uninstall Snap itself:

sudo apt purge snapd
sudo rm -rf ~/snap /snap /var/snap /var/lib/snapd

Conflicts with .deb packages

Sometimes the same app exists in both .deb and Snap formats, which can lead to confusion or even conflicts.

Here’s what to watch for:
— Duplicate entries in your app menu
— Differences in app behavior (Snap runs in a sandbox)
— Ubuntu defaults to launching the Snap version if it exists

To run a specific version, use its full path:

/usr/bin/code   # deb version
/snap/bin/code  # snap version

To avoid surprises, it’s best to stick with one format — especially on servers or in production environments, where consistency matters.