I think I reproduced it : $ sudo apt-get install nagios2 $ sudo rm /etc/nagios2/apache2.conf $ sudo apt-get remove nagios2-common
nagios2 cannot be removed (or reinstalled) if the /etc/nagios2/apache2.conf file is missing for whatever reason.
A workaround would be to : $ sudo touch /etc/nagios2/apache2.conf $ sudo apt-get purge nagios2 nagios2-common $ sudo apt-get install nagios2
Please confirm that this fixes the issue for you.
I think I reproduced it : apache2. conf
$ sudo apt-get install nagios2
$ sudo rm /etc/nagios2/
$ sudo apt-get remove nagios2-common
nagios2 cannot be removed (or reinstalled) if the /etc/nagios2/ apache2. conf file is missing for whatever reason.
A workaround would be to : apache2. conf
$ sudo touch /etc/nagios2/
$ sudo apt-get purge nagios2 nagios2-common
$ sudo apt-get install nagios2
Please confirm that this fixes the issue for you.