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

Re: [SOLVED] Problem removing packages when their uninstall procedures fail



On Sun, Jan 15, 2006 at 07:49:30PM +0200, Giannis Stoilis wrote:
> So, I did the following:
> 1) Removed every file of the package. dpkg -L broken-package | xargs rm
> 2) Opened /var/lib/dpkg/status, found the package and deleted every
> line until the next blank line.
> 
> That did what I wanted to do.

In the future, this might be an easier way to handle this.  Let's say
the package you want to get rid of is "foo".

To remove it in a much easier fashion, try

cd /var/lib/dpkg/info
vi foo.postrm (if the post remove script is failing)
vi foo.prerm (if the pre-remove script is failing)
On the second line, add "exit 0" and save the file. This will stop the
faulty script from executing.
Finally, remove the offending package with "dpkg -P foo"

Attachment: signature.asc
Description: Digital signature


Reply to: