how much disk space is necessary for a package?

I would like to know if is it possible to know how much disk space is necessary for a, specific, packet installation when, obviusly, this specific packet hasn't been installed yet.

For example, with Debian “apt”, it's possible to do:

Code:
alpechin:/home/godo# apt-cache show kplato
Package: kplato
Priority: optional
Section: kde
Installed-Size: 2868
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Architecture: i386
Source: koffice
Version: 1:1.6.3-7
Depends: kdelibs4c2a (>= 4:3.5.9), koffice-libs (>= 1:1.6.3), libart-2.0-2 (>= 2.3.18), libaudio2, libc6 (>= 2.7-1), libfontconfig1 (>= 2.4.0), libfreetype6 (>= 2.3.5), libgcc1 (>= 1:4.1.1), libice6 (>= 1:1.0.0), libidn11 (>= 0.5.18), libjpeg62, libpng12-0 (>= 1.2.13-4), libqt3-mt (>= 3:3.3.8b), libsm6, libstdc++6 (>= 4.1.1), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxft2 (>> 2.1.1), libxi6, libxinerama1, libxrandr2, libxrender1, libxt6, zlib1g (>= 1:1.1.4), koffice-libs (<< 1:1.6.4)
Recommends: khelpcenter | koffice-doc-html (= 1:1.6.3-7)
Filename: pool/main/k/koffice/kplato_1.6.3-7_i386.deb
Size: 903700
MD5sum: 4aef3c57f9e7469592cc9d3254ee62d6
SHA1: 700966e50d884deefb030b0a96efe90d22b66bda
SHA256: 5fdbf74c7bd4aff62832f5b8536d0647c0643236197a231c3eb4c7dc2e6fe247
Description: an integrated project management and planning tool
 KPlato is a project management application, allowing for the planning and
 scheduling of projects. It is in the very early stages of development.
 .
 This package is part of the KDE Office Suite.
Homepage: http://www.koffice.org
Tag: implemented-in::c++, interface::x11, office::project-management, role::program, suite::kde, uitoolkit::qt, use::organizing, x11::application

Where you can see the Installed-Size: 2868.

And, if you decide to install it, again apt shows you the disk space necessary for it and all their dependencies:

Code:
alpechin:/home/godo# apt-get install kplato
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Se instalarán los siguientes paquetes extras:
  koffice-data koffice-libs latex-xft-fonts
Paquetes sugeridos:
  wordnet
Se instalarán los siguientes paquetes NUEVOS:
  koffice-data koffice-libs kplato latex-xft-fonts
0 actualizados, 4 se instalarán, 0 para eliminar y 9 no actualizados.
Necesito descargar 4331kB de archivos.
Se utilizarán 13,7MB de espacio de disco adicional después de esta operación.
¿Desea continuar [S/n]? n
Abortado.
alpechin:/home/godo#


Where we can see the disk space necessary: 13,7MB.

I miss this information... ¿Could you help me?

Thanks.

P.D.:I know that
Code:
 pkg_info -s packet
shows “this information” when the specific packet is already installed, but I would like to know before.
 
I haven't seen that feature, but I have not tried to look. I wonder if you could pass in the web location of the patch or some switch that finds the package on the web and gets its info?
 
I just looked and if the feature is there, it isn't easy, cause I don't see it.

I have never needed this feature personally, but it is definitely an important feature to know the disk space requirements before hand.
 
I think it pretty useless
You can setup system with bigger disk, and monitor disk usage for some time, if it's to much Big next time you rebuild system shrink partition
i use 9GB /usr and that is more than enough for me.

Disk space is real cheap these days
 
As far as I can tell, the only way is to look at the package sizes on the ftp server. It's rather time consuming.
pkg_add -n will (or should) tell you what all would be installed.

I'm sorry that I can't really test this hypothesis for you, as I'm lazily enough running 8-current for which packages are not officialy built yet.
 
You can see the package sizes on the FTP server. However, that is the size of the compress package, and not the amount of disk space that would be used if you install the package.

For ports, you can see the size of the source tarball that will be downloaded by looking in the distinfo file in the port's directory. However, that only tells you how much needs to be downloaded, not how much space would be needed to extract the tarball, nor how much temp space will be needed to compile the port, nor how much space would be needed to install the app. It's just not possible to "guesstimate" that, as it will depend on the OPTIONS you select, what settings you have in /etc/make.conf, what other ports are installed, which filesystem you are using, etc.

IOW, you can get information on how many bytes need to be downloaded, but you can't get information on how many bytes of disk space are needed for the install.
 
Thanks everyone.

I think that If I want to test different utilities that are used to get the same feature (different servers, different clients, etc.), I would like to know the space of disk is going to be required because my partition space is almost full. So, I can decide if I install every of them or I install one of them, remove it, install other, remove it... and so.

I think that this feature would be possible if I am working with binary version of packets (pkg_add -r ...). This binary version is already compiled and every its dependencies are known. So, if the installed-size was shown "into the packet", it would be possible to develop a script to calculate it.

Maybe, some developer of the "packet system" shares this opinion and promote it to get implement it.

Thanks.
 
Back
Top