$ dpkg -l | grep php7.0-cgi
ri php7.0-cgi 7.0.13-0ubuntu0.16.04.1 amd64 server-side, HTML-embedded scripting language (CGI binary)
$ apt-get purge php7.0-cgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libc-dev-bin libice-dev libice6 libjbig-dev liblzma-dev libpthread-stubs0-dev libsm-dev libsm6 libtiffxx5 libvpx-dev libx11-dev libx11-doc libxau-dev libxcb1-dev
libxdmcp-dev libxpm-dev libxt-dev libxt6 pkg-config x11-common x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools xtrans-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
php7.0-cgi*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 8,658 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 72987 files and directories currently installed.)
Removing php7.0-cgi (7.0.13-0ubuntu0.16.04.1) ...
ERROR: Conf php7.0-cgi does not exist!
dpkg: error processing package php7.0-cgi (--purge):
subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
php7.0-cgi
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ apt-get install php7.0-cgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.0-cgi is already the newest version (7.0.13-0ubuntu0.16.04.1).
The following packages were automatically installed and are no longer required:
libc-dev-bin libice-dev libice6 libjbig-dev liblzma-dev libpthread-stubs0-dev libsm-dev libsm6 libtiffxx5 libvpx-dev libx11-dev libx11-doc libxau-dev libxcb1-dev
libxdmcp-dev libxpm-dev libxt-dev libxt6 pkg-config x11-common x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools xtrans-dev
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ dpkg --remove --force-remove-reinstreq php7.0-cgi
(Reading database ... 72987 files and directories currently installed.)
Removing php7.0-cgi (7.0.13-0ubuntu0.16.04.1) ...
ERROR: Conf php7.0-cgi does not exist!
dpkg: error processing package php7.0-cgi (--remove):
subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
php7.0-cgi
How can I get php7.0-cgi
removed so that I can perform a fresh install? The package appears to be broken because it is not behaving as it should.