root@macmini:/var/logs/apache2# apt-get -f install Reading package lists... Done Building dependency tree... Done Correcting dependencies... Done The following extra packages will be installed: courier-authdaemon courier-authlib xserver-xorg-core The following NEW packages will be installed: courier-authlib xserver-xorg-core The following packages will be upgraded: courier-authdaemon 1 upgraded, 2 newly installed, 0 to remove and 48 not upgraded. 830 not fully installed or removed. Need to get 0B/4079kB of archives. After unpacking 12.0MB of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: courier-authdaemon: dependency problems, but removing anyway as you request: courier-imap depends on courier-authdaemon (>= 0.47); however: Package courier-authdaemon is to be removed. dpkg: error processing courier-authdaemon (--remove): Package is in a very bad inconsistent state - you should reinstall it before attempting a removal. terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct NULL not valid Aborted root@macmini:/var/logs/apache2# Errors were encountered while processing: courier-authdaemon