Snap packages bundle applications and their dependencies for Linux. Removing a snap uninstalls the named package; --purge skips creation of its automatic removal snapshot.

The package removal only targets the named snap. Base snaps, content snaps, and other application snaps remain installed when another package still depends on them or when they were installed separately.

Saved snapshots are separate from installed packages. Removing a package, with or without --purge, leaves earlier snapshots in place; deleting saved snapshots requires separate management through snap data snapshots.

Steps to remove a snap package:

  1. Check the package before removing it.
    $ snap list hello-world
    Name         Version  Rev  Tracking       Publisher    Notes
    hello-world  6.4      29   latest/stable  canonical**  -

    For another installed snap, replace hello-world with its name throughout.

  2. Remove the package.

    Removal deletes the snap's installed revisions and snap-managed user, system, and configuration data. snapd normally saves a snapshot first and keeps it for 31 days by default, but automatic snapshots can be disabled and are disabled by default on Ubuntu Core.

    Removing a snap that provides services stops them and can interrupt connected clients.

    $ sudo snap remove hello-world
    hello-world removed (snap data snapshot saved)

    To skip the automatic snapshot, run this command instead. No new recovery snapshot is created, so back up any data needed later before removal.

    $ sudo snap remove hello-world --purge
    hello-world removed
  3. Check the saved snapshots after removal.
    $ snap saved
    Set  Snap         Age    Version  Rev  Size  Notes
    1    hello-world  2.75s  6.4      29   193B  auto

    The auto note identifies an automatic snapshot. With --purge, no new snapshot is created, but earlier sets can still appear here.

  4. Confirm that the package is no longer installed.
    $ snap list hello-world
    error: no matching snaps installed
Share this guide