The debian package can have several states:
The package is not installed on your system.
Only the configuration files of the package exist on the system.
The installation of the package has been started, but not completed for some reason.
The package is unpacked, but not configured.
The package is unpacked and configuration has been started, but not yet completed
for some reason.
The package awaits trigger processing by another package.
The package has been triggered.
The package is correctly unpacked and configured.
I am trying to remove/purge a "half-configure" package this fails because the apt-get package module does not see that this package has been installed but not yet fully setup. It only detects the "installed" state.
I have a patch that add this state to "installed" package. Then I can remove the package the side effect is that cfengine does not try to install the package on every cfengine run, but the package will fail every time.
Or we must have a separate file for debian package that are not properly installed.