ubuntu snap package installation update and delete with simple use
- 2020-06-19 12:32:37
- OfStack
An overview of the
What is snap? snap is a brand new package management approach. It is similar to having one container with all the files and libraries of one application, which are completely independent of each application. So the benefit of using the snap package is that it solves the dependency problem between applications, making it easier to manage between applications. The problem with this is that it takes up more disk space
The Snap installation package extension is.snap, which is similar to a container that contains all the files and libraries needed for an application (the snap package contains a proprietary root file system containing the dependent packages). They will be installed in a separate directory; Individual applications are isolated from each other. Using snap has many benefits. First, it solves the dependency problem of software packages. Second, it also makes the application easier to manage.
Not many applications now support snap. snap package 1 is installed in /snap
1 Some common commands
It's easy to use the snap package, so Let me introduce some common commands
sudo snap list
Lists the snap packages that have been installed
sudo snap find <text to search>
Search for the snap package to install
sudo snap install <snap name>
Install 1 snap package
sudo snap refresh <snap name>
Update one snap package, or all snap packages if you don't add the package name
sudo snap revert <snap name>
Restore 1 package to the previously installed version
sudo snap remove <snap name>
Delete 1 snap package
Simple use
To demonstrate how to install and remove a package, I will install an editor
First I want to install ES73en-ES74en
So first look for 1 to see if there is ES78en-ES79en
➜ bin sudo snap search hello-world
Name Version Developer Notes Summary
hello-world 6.3 canonical - The 'hello-world' of snaps
hello-world-om26er 0.2 om26er - A great snap
hello-lhc 1.0 cprov - Hello world application for LHC
Yes, there is. So let's install it
➜ ~ snap install hello-world
hello-world 6.3 from 'canonical' installed
Downloading can be slow, so it's best to hang up the agent
And then let's see if 1 is installed
➜ bin snap list
Name Version Rev Developer Notes
core 16-2.28.5 3247 canonical core
hello-world 6.3 27 canonical -
Finally, we delete it
➜ ~ snap remove hello-world
hello-world removed
The address of the snap package
If you don't know what snap package you can download, you can download the snap package at the following address to install
https://uappexplorer.com/snaps
One error
Since it took too long to install ES106-fm, I stopped the operation and later reported an error when installing the package again
error: cannot install "douban-fm": snap "core" has changes in progress
The solution is simple
First look at change in progress
➜ / snap changes
ID Status Spawn Ready Summary
2 Done 2017-11-15T02:33:51Z 2017-11-15T02:33:51Z Refresh all snaps: no updates
3 Error 2017-11-15T03:20:07Z 2017-11-15T03:20:23Z Install "douban-fm" snap
4 Done 2017-11-15T03:20:07Z 2017-11-15T03:20:10Z Initialize device
5 Error 2017-11-15T03:20:38Z 2017-11-15T03:34:21Z Install "douban-fm" snap
6 Doing 2017-11-15T03:34:27Z - Install "douban-fm" snap
That's right
install douban-fm
It's still in doing, so abort the process
➜ / sudo snap abort 6
➜ / snap changes
ID Status Spawn Ready Summary
2 Done 2017-11-15T02:33:51Z 2017-11-15T02:33:51Z Refresh all snaps: no updates
3 Error 2017-11-15T03:20:07Z 2017-11-15T03:20:23Z Install "douban-fm" snap
4 Done 2017-11-15T03:20:07Z 2017-11-15T03:20:10Z Initialize device
5 Error 2017-11-15T03:20:38Z 2017-11-15T03:34:21Z Install "douban-fm" snap
6 Error 2017-11-15T03:34:27Z 2017-11-15T03:40:51Z Install "douban-fm" snap
Then it's time to do the installation again
Query for the most recent action
$ snap changes
For more information on snap, see the man manual:
$ man snap
update: Snap is now available on most Linux distributions, greatly simplifying the installation of Linux software.
conclusion