I encountered this error in the course of applying updates on an Ubuntu 16.04.5 LTS server. The error prevented the apt-get
upgrade process from completing. Attempting to remove the package (dpkg --remove unattended-upgrades)
failed. A quick Google search found this solution that worked.
# dpkg –remove –force-remove-reinstreq unattended-upgrades
dpkg: warning: overriding problem because –force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
(Reading database … 100727 files and directories currently installed.)
Removing unattended-upgrades (0.90ubuntu0.9) …
Processing triggers for man-db (2.7.5-1) …
That removed the package and then I was able to reinstall it and complete my package updates.