One day last week when doing a normal "apt-get update" my system hung and had to be rebooted. This left a core deb package in a bad state. To make things worse it was a core apt/python package. Normally you can fix an inconsistency via "sudo apt-get -f install" $ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 83.4 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/saucy-proposed/main python-aptdaemon all 1.1.1-0ubuntu4 [83.4 kB] Fetched 83.4 kB in 0s (730 kB/s) dpkg: error processing python-aptdaemon (--configure): Package is in a very bad inconsistent state - you should reinstall it before attempting configuration. Errors were encountered while processing: python-aptdaemon E: Sub-process /usr/bin/dpkg returned an error code (1) $
Next thing was to try and remove it then re-install: $ sudo apt-get remove --purge python-aptdaemon Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: python-aptdaemon* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 466 kB disk space will be freed. Do you want to continue [Y/n]? y dpkg: error processing python-aptdaemon (--purge): Package is in a very bad inconsistent state - you should reinstall it before attempting a removal. Errors were encountered while processing: python-aptdaemon E: Sub-process /usr/bin/dpkg returned an error code (1) $ Now the fix was to use the sledge hammer which is: $ sudo dpkg --remove --force-remove-reinstreq python-aptdaemon dpkg: warning: overriding problem because --force enabled: Package is in a very bad inconsistent state - you should reinstall it before attempting a removal. (Reading database ... 374673 files and directories currently installed.) Removing python-aptdaemon ... $ Then I was able to reinstall it and restore the system to working order $ sudo apt-get install python-aptdaemon Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: python-aptdaemon 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/83.4 kB of archives. After this operation, 466 kB of additional disk space will be used. Selecting previously unselected package python-aptdaemon. (Reading database ... 374637 files and directories currently installed.) Unpacking python-aptdaemon (from .../python-aptdaemon_1.1.1-0ubuntu4_all.deb) ... Setting up python-aptdaemon (1.1.1-0ubuntu4) ... $ Since this is not the first time this has happened, I thought I would share with the group. Just need to remember it when the time comes and you get "Package is in a very bad inconsistent state" error. -- Joe /** ** Joseph T Apuzzo ** GPFS SME (Linux, Windows, AIX), Linux LPI-c1 ** http://www.linkedin.com/in/japuzzo/ **/
_______________________________________________ Mid-Hudson Valley Linux Users Group http://mhvlug.org http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug Upcoming Meetings (6pm - 8pm) Vassar College Nov 6 - Security: Locking Your Doors Dec 4 - OpenFlow: Open Standard for Networking Hardware Jan 8 - January Meeting
