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

Re: Weeding



Joey Hess <joey@kitenet.net> writes:
> Bill Wohler wrote:
> >   OK, my disk filled up today. Ultimately, I'll get a bigger disk, but
> >   in the short term, I'd like to remove some large, unused packages. Is
> >   there a tool that gives me a list of installed packages, sorted by
> >   size? 
> 
> grep-dctrl -F Status 'ok installed' /var/lib/dpkg/status -n \
> 	-s Installed-Size,Package | perl -pe 's/^(\d+)\n/$1 /' \
> 	| sort -rn | head -20

Joey,

  Thanks a LOT for that script. Before I read it, I had cobbled this:

    installed=`dpkg --get-selections | awk '$2 == "install"{print $1}'`
    for package in $installed; do
	size=`dpkg --status $package | awk '/^Installed-Size:/{print $2}'`
	echo "$size	$package"
    done | sort -nr

  Yours ran in 3 seconds, mine ran in 69 minutes. Mine did have a
  distinct advantage over yours though; I was able to drink 2 beers
  before it returned.

> I'd recommend installing debfoster, and running it once. It'll ask you
> what packages you mean to have installed, will skip over those that
> packages you have installed depend on, and will remove everything else.
> And after you've ran it once, it remembers and you can run it again later
> with only a few questions asked to clean your system up again after it
> gets crufty.

  It's been on my todo list. It's obviously just popped up in priority.
  I'll give it a go. Thanks again, Joey.

--
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: