Public bug reported: I can't uninstall and purge snapd. See how to reproduce the error:
google:ubuntu-18.04-64 .../tasks/google/start-instance# apt install -y snapd Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: zenity | kdialog The following NEW packages will be installed: snapd 0 upgraded, 1 newly installed, 0 to remove and 30 not upgraded. Need to get 14.7 MB of archives. After this operation, 67.6 MB of additional disk space will be used. Get:1 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 snapd amd64 2.37.4+18.04.1 [14.7 MB] Fetched 14.7 MB in 0s (40.0 MB/s) Selecting previously unselected package snapd. (Reading database ... 95738 files and directories currently installed.) Preparing to unpack .../snapd_2.37.4+18.04.1_amd64.deb ... Unpacking snapd (2.37.4+18.04.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Setting up snapd (2.37.4+18.04.1) ... md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: No such file or directory snapd.failure.service is a disabled or a static unit, not starting it. snapd.snap-repair.service is a disabled or a static unit, not starting it. Processing triggers for man-db (2.8.3-2ubuntu0.1) ... google:ubuntu-18.04-64 .../tasks/google/start-instance# apt-cache policy snapd snapd: Installed: 2.37.4+18.04.1 Candidate: 2.37.4+18.04.1 Version table: *** 2.37.4+18.04.1 500 500 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages 100 /var/lib/dpkg/status 2.32.5+18.04 500 500 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 Packages google:ubuntu-18.04-64 .../tasks/google/start-instance# apt remove --purge snapd Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: snapd* 0 upgraded, 0 newly installed, 1 to remove and 30 not upgraded. After this operation, 67.6 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 95800 files and directories currently installed.) Removing snapd (2.37.4+18.04.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... (Reading database ... 95738 files and directories currently installed.) Purging configuration files for snapd (2.37.4+18.04.1) ... Final directory cleanup Discarding preserved snap namespaces Removing extra snap-confine apparmor rules Removing snapd cache rm: cannot remove '/var/cache/snapd/aux': Is a directory 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) google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /var/cache/snapd/aux MJbt3BgxESyOON7gqKVEnA06NLRM3Dxd.json google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /var/cache/snapd/ aux google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /v var/ vmlinuz vmlinuz.old google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /var/lib/snapd/ apparmor/ assertions/ cache/ cookie/ desktop/ device/ features/ mount/ seccomp/ seed/ sequence/ snaps/ state.json google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /var/lib/snapd/ apparmor assertions cache cookie desktop device features mount seccomp seed sequence snaps state.json ** Affects: snapd (Ubuntu) Importance: Undecided Status: New ** Description changed: + I can't uninstall and purge snapd. See how to reproduce the error: - I can't uninstall and purge snapd - - google:ubuntu-18.04-64 .../tasks/google/start-instance# apt install -y snapd + google:ubuntu-18.04-64 .../tasks/google/start-instance# apt install -y snapd Reading package lists... Done - Building dependency tree + Building dependency tree Reading state information... Done Suggested packages: - zenity | kdialog + zenity | kdialog The following NEW packages will be installed: - snapd + snapd 0 upgraded, 1 newly installed, 0 to remove and 30 not upgraded. Need to get 14.7 MB of archives. After this operation, 67.6 MB of additional disk space will be used. Get:1 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 snapd amd64 2.37.4+18.04.1 [14.7 MB] Fetched 14.7 MB in 0s (40.0 MB/s) Selecting previously unselected package snapd. (Reading database ... 95738 files and directories currently installed.) Preparing to unpack .../snapd_2.37.4+18.04.1_amd64.deb ... Unpacking snapd (2.37.4+18.04.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Setting up snapd (2.37.4+18.04.1) ... md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: No such file or directory snapd.failure.service is a disabled or a static unit, not starting it. snapd.snap-repair.service is a disabled or a static unit, not starting it. Processing triggers for man-db (2.8.3-2ubuntu0.1) ... - google:ubuntu-18.04-64 .../tasks/google/start-instance# apt-cache policy snapd snapd: - Installed: 2.37.4+18.04.1 - Candidate: 2.37.4+18.04.1 - Version table: - *** 2.37.4+18.04.1 500 - 500 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages - 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages - 100 /var/lib/dpkg/status - 2.32.5+18.04 500 - 500 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 Packages - + Installed: 2.37.4+18.04.1 + Candidate: 2.37.4+18.04.1 + Version table: + *** 2.37.4+18.04.1 500 + 500 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages + 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages + 100 /var/lib/dpkg/status + 2.32.5+18.04 500 + 500 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 Packages google:ubuntu-18.04-64 .../tasks/google/start-instance# apt remove --purge snapd Reading package lists... Done - Building dependency tree + Building dependency tree Reading state information... Done The following packages will be REMOVED: - snapd* + snapd* 0 upgraded, 0 newly installed, 1 to remove and 30 not upgraded. After this operation, 67.6 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 95800 files and directories currently installed.) Removing snapd (2.37.4+18.04.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... (Reading database ... 95738 files and directories currently installed.) Purging configuration files for snapd (2.37.4+18.04.1) ... Final directory cleanup Discarding preserved snap namespaces Removing extra snap-confine apparmor rules Removing snapd cache rm: cannot remove '/var/cache/snapd/aux': Is a directory dpkg: error processing package snapd (--purge): - installed snapd package post-removal script subprocess returned error exit status 1 + installed snapd package post-removal script subprocess returned error exit status 1 Errors were encountered while processing: - snapd + snapd E: Sub-process /usr/bin/dpkg returned an error code (1) - google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /var/cache/snapd/aux MJbt3BgxESyOON7gqKVEnA06NLRM3Dxd.json - google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /var/cache/snapd/ aux - google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /v - var/ vmlinuz vmlinuz.old - + var/ vmlinuz vmlinuz.old google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /var/lib/snapd/ - apparmor/ assertions/ cache/ cookie/ desktop/ device/ features/ mount/ seccomp/ seed/ sequence/ snaps/ state.json - + apparmor/ assertions/ cache/ cookie/ desktop/ device/ features/ mount/ seccomp/ seed/ sequence/ snaps/ state.json google:ubuntu-18.04-64 .../tasks/google/start-instance# ls /var/lib/snapd/ apparmor assertions cache cookie desktop device features mount seccomp seed sequence snaps state.json -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1824234 Title: with snapd 2.37.4 the command "apt remove --purge -y snapd" fails on ubuntu bionic To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1824234/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs