How to uninstall a snap package manually?

Omar Hossam Ahmed

I am trying to remove a snap package, leagueoflegends, but i am getting this error:

error: cannot perform the following tasks:
- Disconnect leagueoflegends:desktop-legacy from core:desktop-legacy (internal error: connection "leagueoflegends:desktop-legacy core:desktop-legacy" not found in state)
- Disconnect leagueoflegends:wine-4-staging from wine-platform-4-staging:wine-4-staging (cannot setup apparmor for snap "leagueoflegends": cannot load apparmor profiles: exit status 10
apparmor_parser output:
)
- Disconnect leagueoflegends:wine-4-staging from wine-platform-4-staging:wine-4-staging (cannot load apparmor profiles: exit status 10
apparmor_parser output:
)
- Disconnect leagueoflegends:home from core:home (cannot setup apparmor for snap "leagueoflegends": cannot load apparmor profiles: exit status 10
apparmor_parser output:
)
- Disconnect leagueoflegends:home from core:home (cannot load apparmor profiles: exit status 10
apparmor_parser output:
)
- Disconnect leagueoflegends:icon-themes from gtk-common-themes:icon-themes (cannot setup apparmor for snap "leagueoflegends": cannot load apparmor profiles: exit status 10
apparmor_parser output:
)
- Disconnect leagueoflegends:icon-themes from gtk-common-themes:icon-themes (cannot load apparmor profiles: exit status 10
apparmor_parser output:
)

I have attempted to remove the snap package from all the folders its stored at except for /snap/leagueoflegends, where I am getting write-protection error: "cannot remove ... "Read-only file system".

Hannu

You may have created a problem if you have deleted files as indicated.
The "normal" way to handle snap packages is via the snap utility. I have included help text and examples below to get you an impression what to use.

How exactly to get out of the situation you have created is harder to tell.
I suggest you do snap list to find out the actual name of the package you wish to remove, and then try sudo snap remove packagename - for that package.

If that displays errors, then you need to deal with those in a sane manner.


Some tips on "snap" usage...

$ snap list
<list of installed packages here>

$ snap help
The snap command lets you install, configure, refresh and remove snaps.
Snaps are packages that work across many different Linux distributions,
enabling secure delivery and operation of the latest apps and utilities.

Usage: snap  [...]

- - - 8<- - - - -  

For more information about a command, run 'snap help '.
For a short summary of all commands, run 'snap help --all'.

$ snap help remove
Usage:
  snap remove [remove-OPTIONS] ...

The remove command removes the named snap instance from the system.

By default all the snap revisions are removed, including their data and the
common data directory. When a --revision option is passed only the specified
revision is removed.

[remove command options]
      --no-wait     Do not wait for the operation to finish but just print the change id.
      --revision=   Remove only the given revision

$ sudo snap remove ...

Note that at least "core" needs to be there for snap to function... I'm not as sure about the others here, they might be required too.

$ snap list
Name                Version          Rev   Tracking  Publisher     Notes
core                16-2.39.3        7270  stable    canonical✓    core
core18              20190709         1066  stable    canonical✓    base
gtk-common-themes   0.1-22-gab0a26b  1313  stable    canonical✓    -
gtk2-common-themes  0.1              5     stable    canonical✓    -

... installing e.g. gimp or vlc adds a single line each.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How to uninstall npm package?

From Dev

How to uninstall manually openerp module

From Dev

How to uninstall package using puppet

From Dev

How to add a Meteor package manually

From Dev

How to uninstall a package by NuGet package console?

From Dev

How to uninstall a package with dnu?

From Dev

How to uninstall a .deb package?

From Dev

How to run a previous version of a snap package

From Dev

How to uninstall a .deb package?

From Dev

How do you uninstall manually installed Eclipse?

From Dev

How to uninstall manually openerp module

From Dev

How to uninstall manually installed java? (jdk 8)

From Dev

How to start a snap package

From Dev

How to set snap package to devmode?

From Dev

How do I get source to a snap package?

From Dev

How to create a Snap package for a software?

From Dev

How do I include a dependency package in a snap?

From Dev

How can I manually uninstall Wine

From Dev

How to execute gsettings within a snap package confinement

From Dev

How to stop a snap package downloading

From Dev

How to list files installed by a snap package?

From Dev

How to setup PYTHONPATH for a snap package?

From Dev

Removing app folders manually to uninstall a package

From Dev

How can I manually download a snap package? For example, with wget?

From Dev

How to find package name to uninstall a package?

From Dev

How to uninstall MongoDB that was manually installed

From Dev

How to run a previous version of a snap package

From Dev

Uninstall snap but not snap-installed apps?

From Dev

How to uninstall snap from 20.04.1?