I just ran into this doing a dist upgrade from 14.04 to 16.04.3. Now, the initial do-release-upgrade failed mid way, because of something wrong with Postgres. (I can't remember the exact details now, but it started popping up a dialog about postgres, which had a 'close' button, but clicking close caused the dialog to pop up again. And eventually Unity died during the upgrade, forcing me to restart. Which had a number of follow on dpkg issues. (that's why we all want snaps, right?)
Right now, I'm unable to 'apt-get purge' because that script, itself, fails: $ sudo apt-get purge snapd Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-generic linux-generic-lts-xenial Use 'sudo 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, 66.1 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 390390 files and directories currently installed.) Removing snapd (2.27.5~14.04) ... Failed to execute operation: No such file or directory dpkg: error processing package snapd (--purge): subprocess installed pre-removal script returned error exit status 1 Errors were encountered while processing: snapd E: Sub-process /usr/bin/dpkg returned an error code (1) There isn't a 'dpkg --reconfigure' though there is a 'dpkg-reconfigure' but it needs a package name. Though looking around online it seems "dpkg --configure -a" is the more common command to run when things break. When I went to run the contents of 'snapd.prerm' manually, it succeeded in "systemctl stop ..." but it failed at "systemctl disable" with "No such file or directory." -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1687384 Title: apt-get upgrade fails. package snapd 2.23.1~14.04 failed to install/upgrade: subprocess new pre-removal script returned error exit status 5 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1687384/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
