Can't Remove/Uninstall Snap Packages

Yesterday, i’m trying install Apache NetBeans 11.1 from Snap through command line. Now, i want to remove/uninstall Apache NetBeans 11.1 through command line using command:
sudo snap remove netbeans
but, failed. Trying to remove using snap-store but same, failed.

logs when uninstall through command line

[sudo] password for ervan:
error: cannot perform the following tasks:

  • Save data of snap “netbeans” in automatic snapshot set #14 (cannot create archive: runuser: failed to execute tar: No such file or directory (and 0 more))

error when uninstall through snap-store

Unable to remove “Apache Netbeans”:
cannot perform the following tasks:

1 Like

Hm. It looks like the automatic backup is failing for some reason.

Do you have tar installed? (what does which tar print?)

To unblock you, snap remove --purge netbeans would skip the pre-remove backup. You might need to be on snapd 2.40 for that to work though, which some distros don’t have yet. You could disable auto-backups globally though (via snap set, in the docs).

5 Likes

@chipaca thanks that worked like a charm :+1:t2:

Some problem after update the ubuntu from 20.04 to 20.10.
i am can’t remove any snap package.

  • tar is installed
  • Snapd version
snap    2.47.1+20.10.1
snapd   2.47.1+20.10.1
series  16
ubuntu  20.10
kernel  5.8.0-25-generic

Can you show us the error that occurs when you try to remove a snap?

Yes.


andrei@X570-GAMING-X:~$ sudo snap remove opera
[sudo] пароль для andrei: 
ошибка: cannot perform the following tasks:
- Save data of snap "opera" in automatic snapshot set #34 (user: lookup userid 1001: no such file or directory)

1 Like

Hi, can you file a bug against snapd on launchpad for this? It seems like maybe the snapshotting code is a bit naive with respect to uids that may no longer exist

yes. i am create a bug report

1 Like

Signed up just to like this post. Thanks @chipaca

2 Likes