UPDATE: Thanks to Msz Junk for pointing out the typos in the file paths.
What I really should have done was to link to khattam’s article because he did a pretty good job of describing the solution to this error but for my own archives, here goes…. I upgraded my box to Karmic Koala this evening and for some reason, ubiquity-frontend-kde flipped and borked the package management system. When I tried to open Synaptic, I got this:

So I tried
sudo aptitude –configure -a
and
sudo apt-get install -f
and even tried messing with these:
/var/lib/dpkg/info/dbconfig-common.postinst
/var/lib/dpkg/info/dbconfig-common.postrm
but the system wouldn’t budge. Then I found khattam’s article and realized I was looking in the wrong files. To solve this error, close all package management software, and back up and edit the /var/lib/dpkg/status file with the following commands:
sudo cp /var/lib/dpkg/status /var/log/dpkg/status.old
gksudo gedit /var/lib/dpkg/status
Here comes the dicey part. Search for the package causing all this brouhaha and delete its entry. Please be very careful here and make sure you leave a blank line between the package entry below and above the deleted package entry. Here are screenshots of my file before and after selecting the appropriate package description entry.
If you did this right you should be able to open Synaptic and remove the offending package (if you don’t want it any more) or re-install it.I don’t understand why the developers couldn’t cook up a more graceful way for dpkg to show its displeasure.




I received the following error:
E: /var/cache/apt/archives/python-gst0.10_0.10.14-1ubuntu1_i386.deb: subprocess new pre-removal script returned error exit status 1
I looked at all the google errors didn’t help at all. Then looked closely at how dpkg worked.
I found out that the deb files are in archive format (ar).
So I unpacked the deb file with:
ar x python-gst0.10_0.10.14-1ubuntu1_i386.deb
and got the following files:
-rw-r–r– 1 root root 3579 2009-10-27 12:25 control.tar.gz
-rw-r–r– 1 root root 501047 2009-10-27 12:25 data.tar.gz
-rw-r–r– 1 root root 4 2009-10-27 12:25 debian-binary
I tarred xzvf the files and got lots of files but especially
the file called “prerm” ie. pre-removal script.
So it appears this script crapped out but why.
Inside it looks at the current python version.
I had previously mistakenly thought I can set the version of python I can use by using ubuntu’s update-alternatives command:
update-alternatives (8) – maintain symbolic links determining default commands
Bad news it broke some assumptions in this prerm script file! I removed the symbolic link from the update-alernative command and just relinked python to python2.5 binary and the dpkg appears now to work. Phew looks like every problem in the deb infrastructure is probably caused by non-robust code in script files and/or in my case there are too many ways to change the system without understanding some of the consequences.
By: Jon Hornstein on October 27, 2009
at 1:21 pm
Thank you, I had this problem and your post helped me.
Sucessfull operation.
By: Alexandre Penchel on November 9, 2009
at 12:49 pm
thanks. need the info how to disable a package lost after two updates !!
By: lamedp on November 10, 2009
at 10:18 pm
Thanks. This worked.
One small rectification though: your code
sudo cp /var/log/dpkg/status /var/log/dpkg/status.old
gksudo gedit /var/log/dpkg/status
should be (lib instead of log)
sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.old
gksudo gedit /var/lib/dpkg/status
By: Msz Junk on November 10, 2009
at 11:04 pm
Thank you so much! This error happened with my Flash installation so I was without Flash for days until I found this fix.
By: AndrewNoNumbers on November 15, 2009
at 8:05 pm
Thanks for the tips. Worked like a charm! I had a half-configured mdadm. I’m not running RAID, so I guess I can live without that package anyway.
By: Darius Bundrent on November 17, 2009
at 8:56 pm