[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Stuck with dpkg: can neither remove nor reinstall a package



On Sat, Jul 29, 2006 at 20:17:53 -0400, Nick Lidakis wrote:
> Carl Fink wrote:
> >On Sat, Jul 29, 2006 at 05:57:01PM -0400, Nick Lidakis wrote:
> >
> >  
> >>dpkg: warning - old post-removal script returned error exit status 1
> >>dpkg - trying script from the new package instead ...
> >>    
> >
> >Aha!
> >
> >  
> >>and when trying to remove:
> >>dpkg: error processing gtkwifi (--purge):
> >>Package is in a very bad inconsistent state - you should
> >>reinstall it before attempting a removal.
> >>Errors were encountered while processing:
> >>gtkwifi
> >>    
> >
> >Take its advice.  Find the old package and reinstall that (without
> >removing), then purge it, then install the new.
> >  
> There was no old package. The .deb was downloaded (Sourceforge?) from a 
> site to be used with Debian Sid, which I am running. Something happened 
> when I tried to install it; can't remember the original error message.
> 
> So that is why I'm stuck. I can't reinstall the gtkwifi.deb that I have 
> in my home directory in order to complete its removal.
> 
> Any other suggestions?

You can edit the post-removal script yourself. It should be at

/var/lib/dpkg/info/gtkwifi.postrm

I had a look at this script. Its only purpose seems to be to remove the
line

ALL     ALL=(root) NOPASSWD: /usr/bin/gtkwifi-settings-client

from /etc/sudoers. You can always do that yourself if necessary.
Therefore I would simply comment would out everything after

import sys

and before

sys.exit(0)

so that the script is guaranteed to exit with status 0. That should
allow you to reinstall/remove/fix the package, at least as far as apt is
concerned.

-- 
Regards,
          Florian



Reply to: