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

Re: a dpkg question



On Fri, Feb 04, 2005 at 09:17:51AM +0100, Bob Alexander wrote:
> after my removal of Gnome and a run of orphaner running dpkg -l | grep 
> ^r gives me a long list of removed packages whose config files are still 
> there (status rc).
> 
> Is there some trick to purge them all ?

You can try with dpkg --get-selections and
dpkg--set-selections. Something like:


dpkg --get-selections > selections.original

# grep all lines that don't have "deinstall" at then *end* of the
# line.  You never know if there are any packages that have
# "deinstall" in their name.
cat selections.original | grep -v deinstall$ > selections.new

# Check and double check!
diff selections.original selections.new

dpkg --set-selections < selections.new

And now something like `dpkg --remove --pending' or dselect or
whatever is your preferred way to remove packages. In case of dpkg you
may want to add something like --no-act|--dry-run|--simulate to see
what will happen before it actually happens.

In case of problems reset the original selections:
dpkg --set-selections < selections.original

HTH,

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key: keyserver.net ID 0x1735C5C2
"Let your advance worrying become advance thinking and planning."
 - Winston Churchill

Attachment: signature.asc
Description: Digital signature


Reply to: