You are not logged in.

#1 2004-09-23 10:14:39

Dreameen
Member
From: Poland
Registered: 2004-09-06
Posts: 252

Is there a command..

..to list all the installed packages sorted by size??

On Mandrake there was sth like:

rpm -qa --queryformat "%-30{NAME} %-15{INSTALLTIME} %-35{INSTALLTIME:date} %{SIZE}n"|sort -n +1

Maybe it can be translated into arch's language;)[/code]

Offline

#2 2004-09-23 11:32:18

zezaz
Member
From: Bordeaux, France
Registered: 2004-04-26
Posts: 80
Website

Re: Is there a command..

Dreameen wrote:

..to list all the installed packages sorted by size??

AFAIK there is not 1 command to do this. However the following script does the trick:

(for p in `pacman -Q | cut -d ' ' -f 1`; do echo -n "$p "; pacman -Qi $p | grep '^Size' | cut -d ' ' -f 13;  done ) | sort -n -t ' ' -k 2 -r

Remove the last -r if you want the smallest packages first  wink

Offline

#3 2004-09-23 12:11:26

Dreameen
Member
From: Poland
Registered: 2004-09-06
Posts: 252

Re: Is there a command..

It works like charm:)

Whoever wrote this script must be skillful. 8)

Offline

#4 2004-09-23 12:22:30

zezaz
Member
From: Bordeaux, France
Registered: 2004-04-26
Posts: 80
Website

Re: Is there a command..

"Made in homebrew(tm)"  wink

Thanks for your comment. To be honest, with some experience, you will see that it is not that hard to write such one-liners.

It is much harder to write big code that you still keep maintainable, readable, simple. This is really hard - and very interesting too. smile

Offline

#5 2004-09-23 16:03:04

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Offline

Board footer

Powered by FluxBB