How to remove a badly broken package
paulatgm at gmail.com
Fri Nov 9 03:18:51 UTC 2007
yueyu lin said the following on 11/08/2007 08:59 PM:
> Hi, I have a badly broken package, suppose its name is "bad-package". It
> even fails to install because the wrong path and access rights for
> post-install script.
> But the apt-get system show it's already in the repository.
> The problem is that I can't even remove it.
> I tried multiple methods
> apt-get remove --ignore-missing bad-package
> apt-get remove --ignore-hold bad-package
> I even try apt-get -f install bad-package to try to fix the
> installation, but they don't work.
> So everytime, the apt-get system will try to configure the package that
> will never be configured(without a lot of the post-install scripts...).
> Now I even deleted all installed file manually but it still appears in
> the apt-get system and configure and configure every time to install or
> remove any other packages.
> Can someone tell me how to remove the records in the apt-get system?
> thanks in advance
did you try "dpkg -P --force-help bad-package"
also, check the files in /var/lib/dpkg/info/bad-package.* These are the
scripts you claim are broken. You can edit and fix them in place and
maybe get dpkg to successfully remove. It may also be possible to just
delete them to get them out of the system. Be careful though .. if you
delete needed files you can break everything. Maybe make a backup first
(i.e. tar cjvf dpkg-backup.tar.bz2 /var/lib/dpkg/info).
More information about the ubuntu-users