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

Re: Problem removing packages when their uninstall procedures fail



Gabriel Parrondo wrote:

Giannis Stoilis wrote:

Hello,

I have a broken debian package from a third party vendor which I want
to uninstall from a debian sarge system.

Unfortunately, the package demands to run a buggy script prior to
uninstalling, which always fails, thus blocking the uninstallation
procedure.

I want to remove this package completely from the package manager's
database without caring whether its prerm script fails, no matter the
consequenses. I could remove each file from the package by hand, but
that still leaves me with a corrupted dpkg database, blocking me from
using the package manager.

Using "dpkg -r --force-all" doesn't seem to do the trick.

Is there another way to force an uninstallation of a broken package?
Is there a solution I am missing? Could you point me in the right
direction as to what to do? Any help will be greatly appreciated.
There's more than one solution:

For the first one, we need to know which script is failing, why, and try to fix it (no good). To do it you should send the output when you try you uninstall the package.




For the second one, you can use dpkg --get-selection and dpkg --set-selections for rebuilding de dpkg database.
First, you do

dpkg --get-selections > selections.txt

then you edit selections.txt and delete the line containing this package. And then you do:

dpkg --set-selections < selections.txt

Then you just delete the files installed by the package and the package itself.

I don't really know if it works since I never did it, but in theory it should.



Hi,
There is something on the net about removing a line with a "-e" in the post-install and pre-install files of the faulty package. I remember I had to google quiet a lot to find that, and unfortunatly I hav'nt kept a trace of it. But at least you have a pointing direction
Thierry



Reply to: