You are not logged in.

#1 2008-03-24 22:39:36

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Pacman Question

How do I get the download and installation size of all packages on my system?

Offline

#2 2008-03-24 22:45:48

Misbah
Member
Registered: 2008-02-27
Posts: 218

Re: Pacman Question

deleted

Last edited by Misbah (2012-02-14 05:48:48)

Offline

#3 2008-03-25 02:29:08

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Offline

#4 2008-03-25 03:13:43

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Pacman Question

$ 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

#5 2008-03-25 03:25:19

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Re: Pacman Question

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

#6 2008-03-25 03:45:20

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Pacman Question

du -hs /var/cache/pacman/pkg/

Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2008-03-25 03:55:47

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Re: Pacman Question

B wrote:
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

#8 2008-03-25 07:56:18

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Pacman Question

pacman -Q lists all installed packages. I'm sure you can work out the rest yourself.

Offline

#9 2008-03-25 15:26:48

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Re: Pacman Question

tomk wrote:

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

#10 2008-03-25 15:55:46

ibendiben
Member
Registered: 2007-10-10
Posts: 519

Re: Pacman Question

Well did you try pacman -Qi?

Offline

#11 2008-03-25 16:10:29

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Re: Pacman Question

ibendiben wrote:

Well did you try pacman -Qi?

Yes, and it doesn't show download size.

Offline

#12 2008-03-25 16:17:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Pacman Question

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

#13 2008-03-25 16:39:24

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Pacman Question

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.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#14 2008-03-25 22:23:30

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Re: Pacman Question

B wrote:
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

#15 2008-03-25 22:34:00

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Pacman Question

B wrote:

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

Board footer

Powered by FluxBB