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

Re: dpkg status (deinstall) question



Maurits van Rees wrote:

On Wed, Jun 08, 2005 at 07:13:47PM -0700, Brian Nelson wrote:
On Wed, Jun 08, 2005 at 02:25:08PM -0400, Marc Shapiro wrote:
Looking through the output of 'dpkg --get-selections', however, see a lot of packages with a status of 'deinstall.' Are these packages that should be uninstalled, but for some reason are being kept? I have not noticed this status before, and am curious about it.
It means they are marked for deinstallation in the dselect database
(/var/lib/dpkg/status).  "apt-get dist-upgrade" doesn't pay attention to
that database; you'd need to use "apt-get dselect-upgrade" or just run
dselect for any of those to be noticed.

Not quite.

mauritsvanrees:~# dpkg --get-selections | grep deinstall
liba52-0.7.4                                    deinstall
libapache-mod-php4                              deinstall
libedit2                                        deinstall
libldap-2.2-7                                   deinstall
libmysqlclient10                                deinstall
libnet0                                         deinstall
libtdb1                                         deinstall
mysql-common                                    deinstall
mysql-server                                    deinstall
zope                                            deinstall
mauritsvanrees:~# apt-get dselect-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

These are probably packages that I have a new version for that is
named differently, e.g. zope2.7. Or just some packages that I didn't
feel were needed anymore. That one not upgraded package is a local one
that I put on hold. It could affect zope and mysql (it's the
zope-mysqlda package that I persuaded to work with zope2.7 as well),
but quite likely not the others.

The problem here is that these packages have been removed in the past,
but not purged: their configs are still there.

mauritsvanrees:~# dpkg --get-selections | grep deinstall | cut -f1 | xargs dpkg -l
Gewenst=(U)Onbekend/Installeren/Remove/Purge/Hold
| Status=Niet/geInstalleerd/Config/Uitgepakt/(F)config-mislukt/Half-geinst
|/ Fout?=(geen)/Hold/Reinst nodig/X=beide (Status,Fout: hoofdlett=ernstig)
||/ Naam                  Versie                Omschrijving
+++-=====================-=====================-==========================================================
rc  liba52-0.7.4          0.7.4-1               Library for decoding ATSC A/52 streams.
rc  libapache-mod-php4    4.3.10-8              server-side, HTML-embedded scripting language (apache 1.3
rc  libedit2              2.9.cvs.20040827-1    BSD editline and history libraries
rc  libldap-2.2-7         2.2.23-1              OpenLDAP libraries
rc  libmysqlclient10      3.23.56-2             LGPL-licensed client library for MySQL databases
rc  libnet0               1.0.2a-7              library for the construction and handling of network packe
rc  libtdb1               1.0.6-11              Trivial Database - shared library
rc  mysql-common          4.0.24-2              mysql database common files (e.g. /etc/mysql/my.cnf)
rc  mysql-server          4.0.24-2              mysql database server binaries
rc  zope                  2.6.4-1.6             Open Source Web Application Server

I don't know an official way to really purge these. Ah well, some
creativity on the command line should solve it.

mauritsvanrees:~# dpkg --get-selections | grep deinstall | cut -f1 | xargs apt-get remove --purge
Reading Package Lists... Done
Building Dependency Tree... Done
Package liba52-0.7.4 is not installed, so not removed
Package libapache-mod-php4 is not installed, so not removed
Package libedit2 is not installed, so not removed
Package libldap-2.2-7 is not installed, so not removed
Package libmysqlclient10 is not installed, so not removed
Package libnet0 is not installed, so not removed
Package libtdb1 is not installed, so not removed
Package mysql-common is not installed, so not removed
Package mysql-server is not installed, so not removed
Package zope is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Okay, maybe not. :-(
So how *do* you purge packages that are already removed? The manual
way would be to just fire up dselect, hunt down those packages and
press underscore to select them for purging. Is there another more
automated way?

Maybe:

dpkg --get-selections | grep deinstall | cut -f1 | xargs dpkg -P


Regards,
Chris

--
Chris Boot
bootc@bootc.net
http://www.bootc.net/



Reply to: