how to *completely* remove a package from the cmd line?
Tyler J. Wagner
tyler at tolaris.com
Tue Aug 10 13:16:23 UTC 2010
On Tuesday 10 Aug 2010 13:46:27 Robert P. J. Day wrote:
> sure, i get all that, but am i just being confused in not seeing how
> that applies to, say, the authbind package above? it's been removed
> (not purged), and "dpkg -L" shows no files in that package. but
> there's clearly *something* still related to that package on my
> system ...
The package left nothing behind. However, the package manager has retained
some of the package data in /var/lib/dpkg. See "status" and "info/" in that
directory.
I don't know why your command-line purge didn't work originally, but "dpkg -P
authbind" will definitely complete the job.
I installed authbind, then removed it, and it has status "rc", but no files.
Snipped for brevity:
root at baal:~# apt-get install authbind
root at baal:~# dpkg -l authbind
ii authbind 1.2.0build3 Allows non-root programs to bind()
to low ports
root at baal:~# apt-get remove authbind
root at baal:~# dpkg -l authbind
rc authbind 1.2.0build3 Allows non-root programs to bind()
to low ports
root at baal:~# dpkg -L authbind
Package `authbind' does not contain any files (!)
root at baal:~# dpkg -P authbind
root at baal:~# dpkg -L authbind
Package `authbind' is not installed.
root at baal:~# dpkg -l authbind
un authbind <none> (no description available)
I tested this with the "hello" package, and it shows as uninstalled after a
normal install, with no configs. So I dug deeper. The difference between the two
packages is the postrm script:
root at baal:/var/lib/dpkg/info# cat authbind.postrm
#!/bin/sh
# $Id: postrm,v 1.1 1998/08/30 02:35:22 ian Exp $
set -e
if test "$1" = purge
then
rm -rf /etc/authbind
fi
It appears that authbind deletes /etc/authbind on purging, which may have files
you've manually created there. On normal removal it leaves this directory
alone. I suspect that dpkg leaves a package as mode "rc" when it has a postrm
script.
Your original problem was "what clutter did authbind leave on my system?" The
answer is "none, except whatever configs you created in /etc/authbind. Purge
the package and it'll remove it for you.
Regards,
Tyler
--
"Never underestimate the bandwidth of a station wagon full of tapes
hurtling down the highway.
-- Andrew S. Tanenbaum
More information about the ubuntu-users
mailing list