3

I accidentally installed zabbix-frontend-php that pulled apache2 as a dependency.

I don't want to use either, and I want to completely delete both packages.

Unfortunately, it seems that apt-get won't let me remove zabbix until I make apache2 work properly for zabbix. I really don't want to spend time fixing broken packages I'm about to delete.

How can I override apt-get and proceed with deletion?

$ apt-get remove apache2 zabbix-frontend-php
Package 'apache2' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  apache2-bin apache2-data
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  zabbix-frontend-php
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 28.2 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 28117 files and directories currently installed.)
Removing zabbix-frontend-php (1:2.4.7-1+jessie) ...
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript apache2, action "restart" failed.
dpkg: error processing package zabbix-frontend-php (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 zabbix-frontend-php
E: Sub-process /usr/bin/dpkg returned an error code (1)

1 Answer 1

1

The question and answer here should help:

https://askubuntu.com/questions/438345/how-to-remove-install-a-package-that-is-not-fully-installed

As I read it either of these commands should do what you need:

apt-get --force-yes remove <pkgname>

dpkg -r <pkgname>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.