Unable to purge snapd on the freshly installed system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
firefox (Ubuntu) |
Fix Released
|
Undecided
|
Amin Bandali | ||
hunspell-en-us (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
snapd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Steps to reproduce:
1. Have Ubuntu 24.04 LTS installed from 20240323 ISO
2. Install Konqueror browser to make it fallback web-browser by `sudo apt-get install konqueror --no-install-
3. Try to purge Snapd from the system by `sudo apt autopurge snapd`
Expected results:
* Snapd purged, /snap and /var/snap directories are removed
Actual results:
* got many errors in the terminal (see below), /snap and /var/snap directories are not removed:
```
$ sudo apt autopurge snapd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
snapd*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
N: Ignoring file 'ubuntu.
Do you want to continue? [Y/n]
(Reading database ... 173821 files and directories currently installed.)
Purging configuration files for snapd (2.60.4+23.10) ...
Stopping snap-firefox-
Stopping unit snap-firefox-
Waiting until unit snap-firefox-
snap-firefox-
Removing snap firefox and revision 4033
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
rm: cannot remove '/var/snap/
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)
$ sudo du -sh /snap/
72K /snap/
$ sudo du -sh /var/snap/
12M /var/snap/
```
ProblemType: Package
DistroRelease: Ubuntu 24.04
Package: snapd (not installed)
ProcVersionSign
Uname: Linux 6.8.0-11-generic x86_64
ApportVersion: 2.28.0-0ubuntu1
AptOrdering:
snapd:amd64: Purge
NULL: ConfigurePending
NULL: PurgePending
NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckR
Date: Sat Mar 23 17:43:57 2024
ErrorMessage: installed snapd package post-removal script subprocess returned error exit status 1
InstallationDate: Installed on 2024-03-23 (0 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Daily amd64 (20240323)
Python3Details: /usr/bin/
PythonDetails: N/A
RelatedPackageV
dpkg 1.22.4ubuntu5
apt 2.7.12
SourcePackage: snapd
Title: package snapd (not installed) failed to install/upgrade: installed snapd package post-removal script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
Hello,
This appears to be due to the Firefox snap's use of the mount-control interface for accessing system hunspell dictionaries. There is work in progress for moving away from mount-control and using a simpler and cleaner approach of using system-files for that instead, which should also alleviate this.
However, ideally snapd should handle a case like this properly, so thanks for marking this bug as affecting snapd as well.