apt purge snapd fails in LXD (on amd64)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd (Debian) |
New
|
Unknown
|
|||
snapd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I have started an LXD container and tried removing snapd:
$ lxc launch ubuntu-daily:groovy snapd-postrm
Creating snapd-postrm
Starting snapd-postrm
$ lxc shell snapd-postrm
root@snapd-
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libfreetype6 squashfs-tools
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
snapd*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 105 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 31149 files and directories currently installed.)
Removing snapd (2.44.3+20.04) ...
Stopping snap.lxd.
Stopping unit snap.lxd.
Waiting until unit snap.lxd.
snap.lxd.
Stopping snap.lxd.
Stopping unit snap.lxd.
Waiting until unit snap.lxd.
snap.lxd.
Stopping snap.lxd.
Stopping unit snap.lxd.
Waiting until unit snap.lxd.
snap.lxd.
dpkg: warning: while removing snapd, unable to remove directory '/snap': Device or resource busy - directory may be a mount point?
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
(Reading database ... 31079 files and directories currently installed.)
Purging configuration files for snapd (2.44.3+20.04) ...
Stopping snap.lxd.
Stopping unit snap.lxd.
Waiting until unit snap.lxd.
snap.lxd.
Removing snap.lxd.
Stopping snap.lxd.
Stopping unit snap.lxd.
Waiting until unit snap.lxd.
snap.lxd.
Removing snap.lxd.
Stopping snap-core18-
Stopping unit snap-core18-
Waiting until unit snap-core18-
snap-core18-
Removing snap core18 and revision 1754
Removing snap-core18-
Stopping snap-lxd-
Stopping unit snap-lxd-
Waiting until unit snap-lxd-
snap-lxd-
Removing snap lxd and revision 14954
Stopping unit snap.lxd.
Waiting until unit snap.lxd.
snap.lxd.
Stopping unit snap.lxd.
Waiting until unit snap.lxd.
snap.lxd.
Removing snap-lxd-
Stopping snap-snapd-
Stopping unit snap-snapd-
Waiting until unit snap-snapd-
snap-snapd-
Removing snap snapd and revision 7264
Removing snap-snapd-
Final directory cleanup
rm: cannot remove '/snap': Device or resource busy
dpkg: error processing package snapd (--purge):
installed snapd package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@snapd-
100
I noticed the failure first when building LXD autopkgtest backend images:
autopkgtest-
...
Removing snap snapd and revision 7264
Removing snap-snapd-
Final directory cleanup
rm: cannot remove '/snap': Device or resource busy
dpkg: error processing package snapd (--purge):
installed snapd package post-removal script subprocess returned error exit status 1
...
Changed in snapd (Debian): | |
status: | Unknown → New |
Status changed to 'Confirmed' because the bug affects multiple users.