The removal scripts in the new cfengine 3.15.2 packages also have issues. While cleaning up after my testing for the initial bug report, I encountered the following.
# apt-get purge cfengine3 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: cfengine3* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 318526 files and directories currently installed.) Purging configuration files for cfengine3 (3.15.2-2) ... rmdir: failed to remove '/var/lib/cfengine3': Directory not empty dpkg: error processing package cfengine3 (--purge): installed cfengine3 package post-removal script subprocess returned error exit status 1 Errors were encountered while processing: cfengine3 E: Sub-process /usr/bin/dpkg returned an error code (1) All attempts to remove the package failed until I manually deleted the /var/lib/cfengine3 directory. After manually removing that directory, the "apt-get purge cfengine3" finally succeeded.