You are not logged in.
Pages: 1
Hello! I used ubuntu a while ago, and there was a command to show the packages in order of size. below is that command but limits it to show only the top 10 biggest packages.
dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{printf "%.3f MB \t %s\n", $2/(1024), $1}'
I have no idea how to search for that command on the forums...
Anyway, could someone kindly explain how I could use a command like this (hopefully simpler ) on Arch?
Offline
A quick search for "largest packages" turned up this post by Daenyth:
http://bbs.archlinux.org/viewtopic.php?id=68400
I use Byte's script which is linked to at the bottom of the first page:
http://bbs.archlinux.org/viewtopic.php? … 65#p306065
Offline
Take a look at pacgraph
Offline
well, thank you. I did try 'Biggest packages,' which brought nothing useful, I couldn't figure out what to search for after that. Hadn't entered my mind to use a synonym oops... Thank you for not being too harsh on me.
Offline
I just use ducks !!
The command is
du -cks * | sort -rn | head -11
I have also created an alias called ducks for the above...and everytime I type in ducks...it shows me the hogs within that folder. Most times I am only concerned with the files in the home directory. The files in the other partitions (/ and or var) are most likely needed or I can clean var with pacman -Sc
Last edited by Inxsible (2010-05-26 04:34:58)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Hi!
I think I managed to keep it shorter then the dpkg version.
perl -e '@i=`pacman -Qi`;for(@i){if(/Name\s+:(.+)/){$n=$1;}if(/Installed Size\s+:(.+) K/){$s=$1;}$w{$n}=$s;}for$f(sort{$w{$a}<=>$w{$b}}(keys(%w))){printf("\033[31m%8d\033[0mK %s\n",$w{$f},$f);}'
Or... maybe not. But prettier!
Offline
Offline
And this: http://kmkeen.com/pacgraph/
Offline
I want to add this from my .bashrc (it's from somewhere in this forum)
function biggestProgs()
{
echo "-----+---------+---------------------------"
echo " POS | SIZE MB | NAME "
echo "-----+---------+---------------------------"
pacman -Qs|awk '/local/{print substr($3,2)" "substr($1,7)}'|sort -rn|head -$1|awk '{printf "%4d | %7s | %s\n",NR,$1,$2}'
}
Offline
Also there is, for the GUI part, pacstats (it's in AUR)
Ogion
(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant
Offline
Here is a command to get basically the same output as your original ubuntu command gives:
pacman -Qi | awk '/Name/ { name=$3 } /Size/ { printf "%.3fMB\t%s\n", $4/1024, name }' | sort -rh | head -n 10
Offline
I just came up with this :
for file in /var/lib/pacman/local/*; do echo "$(sed -n '/^%SIZE%$/{N;s/.*\n//p}' < $file/desc) ${file##*/}"; done | sort -n
Last edited by TaylanUB (2010-05-27 14:31:39)
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline
Pages: 1