[vox-tech] Help with removal of a stubborn debian package
Rick Moen
vox-tech@lists.lugod.org
Fri, 16 Aug 2002 15:54:24 -0700
Quoting R. Douglas Barbieri (doug@dooglio.net):
> I tried to install KDE3 using the sources specified on this page:
> http://mypage.bluewin.ch/kde3-debian/
Hmm, I had good luck grabbing individual KDE3 packages of interest from
these two sources:
deb http://people.debian.org/~bab/kde3/ ./
deb http://kde3.geniussystems.net/debian/ ./
Notice I didn't say I "installed KDE3". I have no interest in KDE as a
"desktop", but wanted to get KDE3-related updates to a number of
programs such as KMail, Konqueror, KChart, Kivio, KWord, Kontour,
KPersonalizer, KPresenter, and KSpread. Versions of all of those from
the above package sources work great with regular window managers such
as Window Maker.
Anyhow, getting back to your immediate problem:
> For some reason, I can't remove the kdm package.
[...]
> Removing kdm ...
> Stopping K Desktop Manager: not running (/var/run/kdm.pid not found).
> dpkg: error processing kdm (--remove):
> subprocess pre-removal script returned error exit status 128
> Errors were encountered while processing:
> kdm
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> Some errors occurred while unpacking. I'm going to configure the
> packages that were installed. This may result in duplicate errors
> or errors caused by missing dependencies. This is OK, only the errors
> above this message are important. Please fix them and run [I]nstall again
> Press enter to continue.
Well, that's rather lame, that the package signals that it can't be
successfully removed just because it's not running (and thus no PID
file).
The easy way to nuke that problem from orbit is to open up
/var/lib/dpkg/status (the package database) in a text editor. If that
makes you feel nervous, make a backup copy first. (Yes, the Debian
package database _is_ a plain ASCII file.) Now, search forwards for
text "Package: kdm". That will take you to line one of the paragraph (a
series of consecutive non-empty lines) that constitute the database
entry for kdm. Remove all of those lines. Don't worry about whether or
not you also remove empty lines, as long as there remain at least one
between the (previously) adjoining two other entries. Save. Exit.
Now, dpkg no longer thinks kdm is installed at all (even though it is).
So, it'll raise no objection whatsoever to further actions such as
retrieving/installing the "kde2" version. (I.e., this makes your
symptom vanish.)
--
"Is it not the beauty of an asynchronous form of discussion that one can go and
make cups of tea, floss the cat, fluff the geraniums, open the kitchen window
and scream out it with operatic force, volume, and decorum, and then return to
the vexed glowing letters calmer of mind and soul?" -- The Cube, forum3000.org