Tuesday, 24 May 2016

How to Install and Manage Snap Packages on Ubuntu 16.04 LTS

Ubuntu 16.04 LTS introduced “Snap” packages, which are a great new way of installing apps. Snaps require different terminal commands–apt-get and dpkg will only allow you to install .deb packages the old way, not Snaps.
Snaps–which have the “.snap” extension–are more similar to containers. Applications in Snaps are self-contained, include all the libraries they need to function, and are sandboxed. They’ll install to their own directory and they won’t interfere with the rest of your system.
Not all apps are available as snaps just yet, but if you come across one that is, here’s how to install it.
RELATED ARTICLES
Ubuntu 16.04 Makes Ubuntu Exciting Again
Ubuntu hasn’t had the best reputation among Linux users over the past few years–with some even going so far as... [Read Article]
How to Move the Unity Desktop’s Launcher to the Bottom of Your Screen on Ubuntu 16.04
Ubuntu 16.04 LTS includes a long-awaited feature: You can now move the Unity desktop’s launcher to the bottom of your screen.... [Read Article]
Search for Available Snap Packages
To see a list of all available packages in the store, open a terminal and run the following command:
snap find
To search for a specific package by name, just add your search term to the end of the snap find command:
snap find name
For a more complete search–searching package descriptions as well as package names–just pipe the output of the snap find command through the grep filtering tool, like so:
snap find | grep search

How to Install a Snap Package

To install a Snap package, use the following command, specifying the package by name. Because this makes changes to the system, you have to add a sudo before the command to run it with root privileges.
sudo snap install package-name
The snap command will download and install the snap package you specified, displaying the progress in the terminal window.
You can launch the application you installed like any other application. If it’s a graphical application, it should appear in your desktop’s applications menu. Otherwise, just start typing the application’s name at the terminal and press the “Tab” key to automatically complete it. You can then press Enter to launch the application or run the command you installed.

How to Update Snaps

To update an installed Snap package, run the following command, specifying the package’s name. If a new version of the Snap is available, it will be downloaded and installed.
sudo snap refresh package-name
There doesn’t appear to be a command that updates all installed Snaps at the moment, but we wouldn’t be surprised to see one added in the future.

How to List Your Installed Snaps

To list your installed Snap packages, run the following command
snap list
You can use this command to search your installed packages, too–just pipe the output through grep again:
snap list | grep search

How to Remove a Snap Package

To remove an installed Snap package from your computer, run the following command:
sudo snap remove package-name

View Recent Changes

Run the following command to view a list of system changes. This displays a list of the Snap packages you’ve recently installed refreshed (updated), and removed, along with the times those operations took place.
snap changes

See More Operations

To see more snap command operations, view the snap command’s manual with the following command. Use the arrow and page up/down keys to scroll through the manual. press the “q” key to quit when you’re done.
man snap
Ubuntu’s developers will likely continue working on the Snap package format and associated tools, so we’ll likely see more command-line options for working with Snap packages in the future.

If you’re interested in creating your own .snap packages, consult Ubuntu’s Snap documentation for more details.

1 comment:

Fix Guider said...

After you have used your Android smartphone or tab for a while, it accumulates a large volume of trash in its system. This large sum of trash causes frequent freezing, lagging and slowing down of the Android system.

This gives rise to a series of questions; how to delete trash android? Where are the deleted files? Doesn’t Android have a recycle bin? No. Unlike Windows and Mac computers, Android phones and tabs do not have a recycle bin.

There is nothing to be worried though. Android has its own set-up for you to find trashes and empty them without having to go through a recycle bin.