How to Search, Install, Remove Snap Apps in Command Line

January 25, 2021 — 4 Comments

This simple tutorial shows how to search for, install, remove, and list installed Snap applications in Ubuntu from command line.

Snap is an universal Linux package format developed by Canonical, the company behind Ubuntu. Though many users hate the Snap apps, it’s hard to keep away from it since many popular applications (e.g., VLC, Spotify, VS Code, Android Studio) offer official Ubuntu binaries through Snap rather than classic deb package.

As Ubuntu Software still sucks and does not load application pages quite often, you can run followings command instead to search for & install snap applications.

1. Searching for Snap Apps in Terminal:

Simply open terminal from system application launcher. You can then either run snap find or snap search command follow with app name to query the store for available packages.

Both commands below do the same searching for GIMP packages:

snap find gimp

snap search gimp

For the verified publisher, you’ll see a green check mark after the publisher name.

2. Command to Install a Snap App:

To install a Snap application package, simply run snap install command follow with the package name.

After searching for an app, you can then select install one from available packages by running command (VLC for instance):

snap install vlc

Some applications can be installed with --classic flag to access files outside user’s home directory.

3. How to List installed Snap applications:

To list all installed snap applications, simply run snap list in terminal.

snap list

While “core” and “core18” are snap core packages, “snap-store”, “snap-store-proxy”, and “snap-store-proxy-client” relates to the Ubuntu Software.
All others are user installed packages, though “gnome-3-xxx” packages were installed automatically as dependency platform.

4. How to Remove Snap Apps via command:

To remove a snap package, simply run snap remove command follow with package name.

In the case, I’m going to remove VLC snap package via command:

snap remove vlc

NOTE that the dependency platform (e.g., gnome and wine) won’t to be removed while removing the snap that requires it.

Summary:

In brief you can run snap find APP_NAME or snap search APP_NAME to search for available packages. Use snap install PACKAGE_NAME or snap remove PACKAGE_NAME to install or remove an application. And run snap list to list all installed snap applications.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected]

4 responses to How to Search, Install, Remove Snap Apps in Command Line

  1. Howdy,

    snap apps cannot access data on network drives due to security reasons I guess. However for mail apps it is inconvenient to NOT be able to select attachments from network drives.

    Can you please explain how this can be achieved?

    Many thanks,
    Andreas

    • Snap app runs in a sandbox environment. It by default has no access to files outside user’s home directory.

      You can however disable the security confinement by installing snap in --classic mode:

      snap install APP_NAME --classic
  2. Hi,
    This is a small program seen on the Internet to delete old snaps, because when updating a snap, there is no deletion of the old one. Use it with sudo.

    #!/bin/bash
    # Removes old revisions of snaps
    # CLOSE ALL SNAPS BEFORE RUNNING THIS
    set -eu
    LANG=en_US.UTF-8 snap list –all | awk ‘/disabled/{print $1, $3}’ |
    while read snapname revision; do
    snap remove “$snapname” –revision=”$revision”
    done

  3. Thanks! This helped me so much! With this info I removed a failed download of VLC, and reinstalled it. Very useful information, and so well explained.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.