This looks to be a local system issue with python3-minimal being removed and then the prerm scripts from various programs failing due to debhelper scripts that the package use can't find the required binaries.
Removing python3.6-minimal (3.6.8-1~16.04.york1) ... Unlinking and removing bytecode for runtime python3.6 Removing qml-module-io-thp-pyotherside:amd64 (1.4.0-2) ... Removing ubuntu-minimal (1.361) ... Removing ubuntu-system-service (0.3) ... /var/lib/dpkg/info/ubuntu-system-service.prerm: 6: /var/lib/dpkg/info/ubuntu-system-service.prerm: py3clean: not found dpkg: error processing package ubuntu-system-service (--remove): subprocess installed pre-removal script returned error exit status 127 /var/lib/dpkg/info/ubuntu-system-service.postinst: 6: /var/lib/dpkg/info/ubuntu-system-service.postinst: py3compile: not found dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127 Removing ufw (0.35-0ubuntu2) ... Skip stopping firewall: ufw (not enabled) /var/lib/dpkg/info/ufw.prerm: 15: /var/lib/dpkg/info/ufw.prerm: py3clean: not found dpkg: error processing package ufw (--remove): subprocess installed pre-removal script returned error exit status 127 I'm not sure how you got into this state (I see a 3.6.8-1~16.04.york1 python3.6-minimal package being removed-- it is possible the ppa in question has packages that don't have their dependencies setup). I suggest installing 'python3-minimal' then running 'sudo apt-get -f install' and then remove any packages you aren't interested in. ** Changed in: ufw (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ufw in Ubuntu. https://bugs.launchpad.net/bugs/1836722 Title: package ufw 0.35-0ubuntu2 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 127 Status in ufw package in Ubuntu: Invalid Bug description: Not able to use system. pip crashed. ProblemType: Package DistroRelease: Ubuntu 16.04 Package: ufw 0.35-0ubuntu2 ProcVersionSignature: Ubuntu 4.8.0-36.36~16.04.1-generic 4.8.11 Uname: Linux 4.8.0-36-generic x86_64 ApportVersion: 2.20.1-0ubuntu2.19 Architecture: amd64 Date: Tue Jul 16 14:33:11 2019 ErrorMessage: subprocess installed pre-removal script returned error exit status 127 InstallationDate: Installed on 2019-07-10 (5 days ago) InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2) PackageArchitecture: all RelatedPackageVersions: dpkg 1.18.4ubuntu1.5 apt 1.2.32 SourcePackage: ufw Title: package ufw 0.35-0ubuntu2 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 127 UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ufw/+bug/1836722/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp