You are not logged in.
Pages: 1
How do I get the download and installation size of all packages on my system?
Offline
deleted
Last edited by Misbah (2012-02-14 05:48:48)
Offline
I don't get it...
Offline
$ pacman -Qi gcc | grep Size
Installed Size : 69727.74 K
$ ls -sh /var/cache/pacman/pkg/gcc-4.3.0-1-x86_64.pkg.tar.gz
27M /var/cache/pacman/pkg/gcc-4.3.0-1-x86_64.pkg.tar.gz
Offline
I made this little script to get the total installed size of all packages.
from __future__ import with_statement
import sys, os
os.system("sudo pacman -Qi | grep Size | gawk '{print $4}' | sort -g > sizes.txt")
a = 0.0
with open("sizes.txt") as f:
for line in f:
a = a + float(line)
print a/1024, "MB"
os.system("rm sizes.txt")
Now how do I get the total download size of all packages?
Offline
du -hs /var/cache/pacman/pkg/
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
du -hs /var/cache/pacman/pkg/
I did a lot of installing and uninstalling of stuff. That would just size everything I ever downloaded. That's not what I want, lol.
Offline
pacman -Q lists all installed packages. I'm sure you can work out the rest yourself.
Offline
pacman -Q lists all installed packages. I'm sure you can work out the rest yourself.
I know that. But it doesn't show download size for each package.
Offline
Offline
Well did you try pacman -Qi?
Yes, and it doesn't show download size.
Offline
ls -l /var/cache/pacman/pkg lists tarball size i.e. download size. Use pacman -Q and the cache list to work it out.
Offline
ibendiben wrote:Well did you try pacman -Qi?
Yes, and it doesn't show download size.
pacman -Si does, if you want to calculate it. Don't know if that checks every package in the repo or just the ones you installed though.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
solarwind wrote:ibendiben wrote:Well did you try pacman -Qi?
Yes, and it doesn't show download size.
pacman -Si does, if you want to calculate it. Don't know if that checks every package in the repo or just the ones you installed though.
Thanks.
Offline
Don't know if that checks every package in the repo or just the ones you installed though.
The -S option is for packages in the repos you have enabled. The -Q option will check packages you have installed.
So you won't want to use -S for what you want to do.
Last edited by dyscoria (2008-03-25 22:34:21)
flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)
Offline
Pages: 1