sudo apt-get remove --purge mysql-server mysql-client mysql-common
I am getting the following error as I try to remove mysql using the above command:
Reading package lists... DoneBuilding dependency tree Reading state information... DonePackage 'mysql-client' is not installed, so not removedThe following package was automatically installed and is no longer required: php5-mysqlndUse 'apt-get autoremove' to remove it.The following extra packages will be installed: mysql-server-core-5.5 php5-mysqlnd python-aptdaemon python-aptdaemon.gtk3widgets python3-aptdaemon python3-aptdaemon.gtk3widgets python3-aptdaemon.pkcompat python3-uno python3-update-manager ubuntu-drivers-common update-managerThe following packages will be REMOVED: libdbd-mysql-perl* libmysqlclient18* mysql-client-5.5* mysql-common* mysql-server* mysql-server-5.5* php5-mysql* phpmyadmin*The following NEW packages will be installed: php5-mysqlndThe following packages will be upgraded: mysql-server-core-5.5 python-aptdaemon python-aptdaemon.gtk3widgets python3-aptdaemon python3-aptdaemon.gtk3widgets python3-aptdaemon.pkcompat python3-uno python3-update-manager ubuntu-drivers-common update-manager10 upgraded, 1 newly installed, 8 to remove and 115 not upgraded.170 not fully installed or removed.Need to get 0 B/4,388 kB of archives.After this operation, 89.9 MB disk space will be freed.Do you want to continue? [Y/n] YPreconfiguring packages ...(Reading database ... 354910 files and directories currently installed.)Preparing to unpack .../ubuntu-drivers-common_1%3a0.2.91.9_amd64.deb .../var/lib/dpkg/info/ubuntu-drivers-common.prerm: 12: /var/lib/dpkg/info/ubuntu-drivers-common.prerm: py3clean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 12: /var/lib/dpkg/tmp.ci/prerm: py3clean: not founddpkg: error processing archive /var/cache/apt/archives/ubuntu-drivers-common_1%3a0.2.91.9_amd64.deb (--unpack): subprocess new pre-removal script returned error exit status 127/var/lib/dpkg/info/ubuntu-drivers-common.postinst: 6: /var/lib/dpkg/info/ubuntu-drivers-common.postinst: py3compile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Preparing to unpack .../python3-update-manager_1%3a0.196.13_all.deb .../var/lib/dpkg/info/python3-update-manager.prerm: 6: /var/lib/dpkg/info/python3-update-manager.prerm: py3clean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not founddpkg: error processing archive /var/cache/apt/archives/python3-update-manager_1%3a0.196.13_all.deb (--unpack): subprocess new pre-removal script returned error exit status 127/var/lib/dpkg/info/python3-update-manager.postinst: 6: /var/lib/dpkg/info/python3-update-manager.postinst: py3compile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Preparing to unpack .../python3-aptdaemon.pkcompat_1.1.1-1ubuntu5.2_all.deb .../var/lib/dpkg/info/python3-aptdaemon.pkcompat.prerm: 6: /var/lib/dpkg/info/python3-aptdaemon.pkcompat.prerm: py3clean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not founddpkg: error processing archive /var/cache/apt/archives/python3-aptdaemon.pkcompat_1.1.1-1ubuntu5.2_all.deb (--unpack): subprocess new pre-removal script returned error exit status 127/var/lib/dpkg/info/python3-aptdaemon.pkcompat.postinst: 6: /var/lib/dpkg/info/python3-aptdaemon.pkcompat.postinst: py3compile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Preparing to unpack .../python3-aptdaemon.gtk3widgets_1.1.1-1ubuntu5.2_all.deb .../var/lib/dpkg/info/python3-aptdaemon.gtk3widgets.prerm: 6: /var/lib/dpkg/info/python3-aptdaemon.gtk3widgets.prerm: py3clean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not founddpkg: error processing archive /var/cache/apt/archives/python3-aptdaemon.gtk3widgets_1.1.1-1ubuntu5.2_all.deb (--unpack): subprocess new pre-removal script returned error exit status 127No apport report written because MaxReports is reached already /var/lib/dpkg/info/python3-aptdaemon.gtk3widgets.postinst: 6: /var/lib/dpkg/info/python3-aptdaemon.gtk3widgets.postinst: py3compile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Preparing to unpack .../python3-aptdaemon_1.1.1-1ubuntu5.2_all.deb .../var/lib/dpkg/info/python3-aptdaemon.prerm: 6: /var/lib/dpkg/info/python3-aptdaemon.prerm: py3clean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not founddpkg: error processing archive /var/cache/apt/archives/python3-aptdaemon_1.1.1-1ubuntu5.2_all.deb (--unpack): subprocess new pre-removal script returned error exit status 127No apport report written because MaxReports is reached already /var/lib/dpkg/info/python3-aptdaemon.postinst: 6: /var/lib/dpkg/info/python3-aptdaemon.postinst: py3compile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Preparing to unpack .../update-manager_1%3a0.196.13_all.deb .../var/lib/dpkg/info/update-manager.prerm: 6: /var/lib/dpkg/info/update-manager.prerm: py3clean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not founddpkg: error processing archive /var/cache/apt/archives/update-manager_1%3a0.196.13_all.deb (--unpack): subprocess new pre-removal script returned error exit status 127No apport report written because MaxReports is reached already /var/lib/dpkg/info/update-manager.postinst: 6: /var/lib/dpkg/info/update-manager.postinst: py3compile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Preparing to unpack .../python-aptdaemon.gtk3widgets_1.1.1-1ubuntu5.2_all.deb .../var/lib/dpkg/info/python-aptdaemon.gtk3widgets.prerm: 6: /var/lib/dpkg/info/python-aptdaemon.gtk3widgets.prerm: pyclean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not founddpkg: error processing archive /var/cache/apt/archives/python-aptdaemon.gtk3widgets_1.1.1-1ubuntu5.2_all.deb (--unpack): subprocess new pre-removal script returned error exit status 127No apport report written because MaxReports is reached already /var/lib/dpkg/info/python-aptdaemon.gtk3widgets.postinst: 6: /var/lib/dpkg/info/python-aptdaemon.gtk3widgets.postinst: pycompile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Preparing to unpack .../python-aptdaemon_1.1.1-1ubuntu5.2_all.deb .../var/lib/dpkg/info/python-aptdaemon.prerm: 6: /var/lib/dpkg/info/python-aptdaemon.prerm: pyclean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not founddpkg: error processing archive /var/cache/apt/archives/python-aptdaemon_1.1.1-1ubuntu5.2_all.deb (--unpack): subprocess new pre-removal script returned error exit status 127No apport report written because MaxReports is reached already /var/lib/dpkg/info/python-aptdaemon.postinst: 6: /var/lib/dpkg/info/python-aptdaemon.postinst: pycompile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Preparing to unpack .../python3-uno_1%3a4.2.8-0ubuntu2_amd64.deb .../var/lib/dpkg/info/python3-uno.prerm: 6: /var/lib/dpkg/info/python3-uno.prerm: py3clean: not founddpkg: warning: subprocess old pre-removal script returned error exit status 127dpkg: trying script from the new package instead .../var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not founddpkg: error processing archive /var/cache/apt/archives/python3-uno_1%3a4.2.8-0ubuntu2_amd64.deb (--unpack): subprocess new pre-removal script returned error exit status 127No apport report written because MaxReports is reached already /var/lib/dpkg/info/python3-uno.postinst: 6: /var/lib/dpkg/info/python3-uno.postinst: py3compile: not founddpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 127Errors were encountered while processing: /var/cache/apt/archives/ubuntu-drivers-common_1%3a0.2.91.9_amd64.deb /var/cache/apt/archives/python3-update-manager_1%3a0.196.13_all.deb /var/cache/apt/archives/python3-aptdaemon.pkcompat_1.1.1-1ubuntu5.2_all.deb /var/cache/apt/archives/python3-aptdaemon.gtk3widgets_1.1.1-1ubuntu5.2_all.deb /var/cache/apt/archives/python3-aptdaemon_1.1.1-1ubuntu5.2_all.deb /var/cache/apt/archives/update-manager_1%3a0.196.13_all.deb /var/cache/apt/archives/python-aptdaemon.gtk3widgets_1.1.1-1ubuntu5.2_all.deb /var/cache/apt/archives/python-aptdaemon_1.1.1-1ubuntu5.2_all.deb /var/cache/apt/archives/python3-uno_1%3a4.2.8-0ubuntu2_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)
How do I resolve this ?