Archives For snap

Ubuntu is distributing more applications as the universal Snap package, but some users don’t like them. So I’m writing this tutorial for those want to completely get rid of Snap and prevent it from being installed back.

NOTE: Before getting started, please backup your app data, e.g., Firefox bookmarks. Attention that Ubuntu Software will also be removed after following this tutorial.

Step 1. Remove Snap apps and the Daemon

Press Ctrl+Alt+T on keyboard to open a terminal window. When it opens, run the commands below one by one.

1.) List all installed snap applications:

snap list

They are by default Snap Store (Ubuntu Software), Firefox, default theme, and few core packages.

2.) Remove the apps one by one, Firefox and Snap-store go first, then theme package, gnome platform (in sandbox), and finally base packages and snapd daemon. NOTE: the package names may vary depends on “snap list” output.

sudo snap remove --purge firefox
sudo snap remove --purge snap-store
sudo snap remove --purge gnome-3-38-2004

Also run snap remove command to remove “gtk-common-themes”, “snapd-desktop-integration”, “bare”, “core20”, and finally “snapd”.

3.) Finally remove the Snap daemon package via apt:

sudo apt remove --autoremove snapd

Step 2. Block Snap package

After completely removed snap packages, you may prevent Ubuntu from installing them back by settings low priority for the Snapd package. Here’s how to do the trick inspired by the way Linux Mint 20 did.

1.) Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to create and open a configuration file:

sudo gedit /etc/apt/preferences.d/nosnap.pref

When the file opens, paste lines below to tell refuse snapd from any repository:

# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.

Package: snapd
Pin: release a=*
Pin-Priority: -10

2. After save the file, refresh package cache via command:

sudo apt update

Now, whenever you try to installed a Snap package or the daemon, it outputs either unmet dependencies (snapd) or package has no installation candidate.

How to Restore:

If you change your mind, run the commands below at any time will install back the Snap apps.

Firstly, run command in terminal (Ctrl+Alt+T) to unblock the daemon:

sudo rm /etc/apt/preferences.d/nosnap.pref

Then, install Ubuntu Software via command:

sudo snap install snap-store

And install Firefox as snap if you want by running command:

sudo apt install firefox

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 support for installing with --classic flag to access files outside user’s home directory. So, the command could be:

snap install vlc --classic

Usually, we install Snap applications from the stable channel. There are also beta, edge, candidate channels include packages for testing purpose. For example, install VLC from its Beta channel, use command:

snap install vlc --channel beta

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.

Snap apps update automatically when new release packages published. So, there may be old packages present in your system after using them for a period of time. To list all of them, use command:

snap list --all

Old packages should be marked as ‘disabled’.

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.

The previous remove command will leave a snapshot of app data on your system. Use --purge flag will clear all the app data:

snap remove --purge vlc

Thanks to @Fernando, the command below will free up disk space by removing all the old disabled snap packages:

snap list --all | awk '/disabled/{system("sudo snap remove " $1 " --revision=" $3)}'

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.

Install OBS Studio Easily via Snap in Ubuntu

Last updated: June 25, 2018

For those who don’t want to add third-party repositories, the free and open-source streaming and recording program OBS Studio now can be easily installed in Ubuntu via Snap package.

Snap is an universal Linux package format. Snap application runs in sandbox and it auto-updates itself once a new release is out and snapped by the maintainer.

The latest OBS Studio 21.1.2 is now available as snap package. You can easily install it from Ubuntu Software:

For Ubuntu 16.04 users who never installed a snap package, run command sudo apt install snapd first to install the daemon.

Or run command in terminal (Ctrl+Alt+T) to install the OSB Studio snap package:

snap install obs-studio

You may found that the snap package is kinda large in file size that because it bundles almost all its dependencies.

NOTE: To access webcam and content on external storage, you need to run 2 two commands:

sudo snap connect obs-studio:camera

sudo snap connect obs-studio:removable-media

Finally launch the software from Gnome launcher or Unity launcher (may need to log out and log in back) and enjoy!

The latest release of Eclipse IDE now is quite easy to install in Ubuntu 16.04, and Ubuntu 18.04 since it’s made into snap package.

Snap is an universal Linux package format. It ships with most run-time libraries so it’s normally large in file size. The snap applications run in sandbox and they can be installed directly from Ubuntu Software.

Eclipse snap

1. So you can just open Ubuntu Software, search for and install Eclipse 4.7.3a snap package:

1. There are 2 Eclipse packages in Ubuntu Software. Check package details for version and source.

2. You see the alert “The application is unconfined. It can …”. That’s because the snap is installed in --classic mode so the IDE can access user directories.

3. Ubuntu 16.04 users who never installed a snap may need to install snapd first via command:

sudo apt-get install snapd snapd-xdg-open

For those prefer Linux command, run command in terminal to install the Eclipse snap:

snap install --classic eclipse

2. Eclipse needs java. If you don’t have it, run command in terminal to install OpenJDK java environment:

sudo apt-get install default-jre

You can also install Oracle Java 8 and/or 10 via this tutorial.

You Can Now Install Skype in Ubuntu via Snap

Last updated: February 1, 2018

Skype for Linux

Skype for Linux now is available as snap, the universal Linux app packaging format, with easy install and automatic updates.

London, UK – 1st February 2018 – Canonical, the company behind Ubuntu, announces today that Skype is now available as a snap, the universal Linux app packaging format. Available as of today, the release means that Skype can deliver its communication service to a wider range of Linux users, including millions on Ubuntu.“, it’s announced in Ubuntu Insights.

For Ubuntu 16.04 users who’ve never installed a snap package, first install snapd daemon in terminal (Ctrl+Alt+T):

sudo apt-get install snapd snapd-xdg-open

The snap package can be installed directly from Ubuntu Software. At the moment, it’s skype 8.14.0.10:

You can also open terminal and run command to install the snap:

snap install skype --classic

And the snap automatic updates itself when a new release is out and published.

To launch Skype, search it from application launcher (may need re-login) or run command:

/snap/bin/skype

Uninstall:

To uninstall the snap, either use Ubuntu Software or run command:

snap remove skype