snapd can't be purged with latest AWS Xenial AMI

Bug #1824242 reported by James McCoy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
Invalid
Undecided
Unassigned
snapd
Fix Released
Medium
Unassigned

Bug Description

The latest AMI for Xenial with the AMI name listed below fails when running apt-get purge snapd:
ubuntu/images/ubuntu-xenial-16.04-amd64-server-20190406

I have confirmed the command works as expected on the following AMI and older:
ubuntu/images/ubuntu-xenial-16.04-amd64-server-20190320

I have listed the output of the command below:

/home/ubuntu# apt-get purge snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  snapd* ubuntu-core-launcher*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 94.8 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 51356 files and directories currently installed.)
Removing ubuntu-core-launcher (2.37.4ubuntu0.1) ...
Removing snapd (2.37.4ubuntu0.1) ...
Purging configuration files for snapd (2.37.4ubuntu0.1) ...
Stopping snap.amazon-ssm-agent.amazon-ssm-agent.service
Stopping unit snap.amazon-ssm-agent.amazon-ssm-agent.service
Waiting until unit snap.amazon-ssm-agent.amazon-ssm-agent.service is stopped [attempt 1]
snap.amazon-ssm-agent.amazon-ssm-agent.service is stopped.
Removing snap.amazon-ssm-agent.amazon-ssm-agent.service
Stopping snap-amazon\x2dssm\x2dagent-1068.mount
Stopping unit snap-amazon\x2dssm\x2dagent-1068.mount
Waiting until unit snap-amazon\x2dssm\x2dagent-1068.mount is stopped [attempt 1]
snap-amazon\x2dssm\x2dagent-1068.mount is stopped.
Removing snap amazon-ssm-agent and revision 1068
Removing snap-amazon\x2dssm\x2dagent-1068.mount
Stopping snap-core-6673.mount
Stopping unit snap-core-6673.mount
Waiting until unit snap-core-6673.mount is stopped [attempt 1]
snap-core-6673.mount is stopped.
Removing snap core and revision 6673
Removing snap-core-6673.mount
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):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Errors were encountered while processing:
 snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
James McCoy (therealmccoy25) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the bugreport. This is fixed in xenial-proposed with snapd 2.38

Changed in snapd:
status: New → In Progress
importance: Undecided → Medium
Zygmunt Krynicki (zyga)
Changed in snapd:
milestone: none → 2.38
Revision history for this message
Robert C Jennings (rcj) wrote :

Marking as 'invalid' cloud-images as this is not a issue particular to the cloud image build.

Changed in cloud-images:
status: New → Invalid
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The fix for the aux directory was released long ago. Marking as such.

Changed in snapd:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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