It seems likely you have a custom python path configured which calls a version of pyclean not provided by an official Ubuntu package.
package:apport:2.20.1-0ubuntu2.15 Preparing to unpack .../apport_2.20.1-0ubuntu2.18_all.deb ... File "/usr/bin/pyclean", line 63 except (IOError, OSError), e: ^ SyntaxError: invalid syntax -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apport in Ubuntu. https://bugs.launchpad.net/bugs/1781231 Title: package apport 2.20.1-0ubuntu2.15 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1 Status in apport package in Ubuntu: New Bug description: Get it when trying to start terminal. ProblemType: Package DistroRelease: Ubuntu 16.04 Package: apport 2.20.1-0ubuntu2.15 ProcVersionSignature: Ubuntu 4.13.0-32.35~16.04.1-generic 4.13.13 Uname: Linux 4.13.0-32-generic x86_64 NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia ApportLog: ApportVersion: 2.20.1-0ubuntu2.15 Architecture: amd64 Date: Wed Jul 11 08:32:16 2018 ErrorMessage: subprocess new pre-removal script returned error exit status 1 InstallationDate: Installed on 2017-08-11 (333 days ago) InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801) PackageArchitecture: all RelatedPackageVersions: dpkg 1.18.4ubuntu1.3 apt 1.2.24 SourcePackage: apport Title: package apport 2.20.1-0ubuntu2.15 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1 UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1781231/+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