Snap does not remove dependents with dependencies

Bug #2023686 reported by PetiePooo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Issue: A default Ubuntu 22.04 server installs the snapd, core20, and lxd snaps. Attempting to remove all three at once exposes the dependency chain by requiring each one to be removed separately.

Goal: If removing snaps with dependencies, if all dependent snaps are also being removed, they should all be removed in the same invocation according to their dependency chain.

Eg, what happens now:

$ sudo snap remove lxd core20 snapd
error: cannot remove "lxd", "core20", "snapd": snap "core20" is not removable: snap is being used by snap lxd.
$ sudo snap remove lxd
lxd removed
$ sudo snap remove core20 snapd
error: cannot remove "core20", "snapd": snap "snapd" is not removable: remove all other snaps first
$ sudo snap remove core20
core20 removed
$ sudo snap remove snapd
snapd removed
$

What I'd like:

$ sudo snap remove lxd core20 snapd
lxd removed
core20 removed
snapd removed
$

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.