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

Re: Removing desktop environments



Hello.

cga2000, 06.02.2007 00:29:
> What bothers me, though, is that a lot of the stuff in /usr/share/ --
> one Meg here .. 600K there .. etc. apparently belongs to packages I have
> removed (apt-get remove package-name) .. Probably adds up to a hundred
> Meg or thereabout .. Looks like I should have specified a purge flag or
> whatever and I would probably have freed up a couple more hundred
> Megs.. probably too late now.

No problem. You could use some one-liner like the following:

# for i in `dpkg -l | grep ^rc | awk '{print $2}'`;do dpkg -P "$i";done

Explanation:

dpkg -l: This will obviously print out the status of every known package.
grep ^rc: Only removed packages with config files left are relevant.
awk '{print $2}': We only need the package names.
dpkg -P: Purge the package.

But make sure that you *really* need none of those config files anymore.


Regards, Mathias

-- 
debian/rules

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: