Skip to content
Calcrivo

Package Size Calculator

Compare package download size vs installed size and estimate the compression ratio.

Inputs

Installed:Download Ratio

3.20

Space Expansion on Install (MB)

55.0

Total Download Size (all packages)

25 MB

Total Installed Size (all packages)

80 MB

Step by step

  1. Values used

    Download (Compressed) Size (MB) = 25; Installed (Uncompressed) Size (MB) = 80; Number of Such Packages (for batch estimate) = 1

  2. Compression ratio

    compression_ratio = installed_size / download_size

  3. Installed:Download Ratio

    = 3.20

  4. Space Expansion on Install (MB)

    = 55.0

  5. Total Download Size (all packages)

    = 25 MB

  6. Total Installed Size (all packages)

    = 80 MB

How it works

Package managers report both a download size (the compressed .deb/.rpm archive transferred over the network) and an installed size (the actual disk space consumed once files are extracted) — `apt show <pkg>` and `dnf info <pkg>` both display these separately. The ratio between them reflects how compressible the package's contents are: text-heavy packages (documentation, scripts, source) compress well and show a high ratio, while packages dominated by already-compressed binaries or media compress poorly. Planning disk capacity for an install or upgrade should always use installed size, not download size.

Formula

Compression ratio

compression_ratio = installed_size / download_size

Frequently Asked Questions

Why is a package's installed size always larger than its download size?

The download is a compressed archive (typically xz, gzip, or zstd-compressed within the .deb/.rpm container format), while the installed size reflects the actual uncompressed files written to disk — compression ratios of 2-4x are common depending on content type.

How do I check a package's download and installed size before installing?

On Debian/Ubuntu, `apt show <package>` lists both 'Download-Size' and 'Installed-Size'. On Fedora/RHEL, `dnf info <package>` shows only installed size directly, but `dnf install --downloadonly --assumeno <package>` reports the download size for planning bandwidth.

Does disk space planning need to account for both cached and installed copies?

Yes — during installation, both the downloaded archive (cached under /var/cache/apt or /var/cache/dnf) and the extracted installed files temporarily coexist on disk, so peak disk usage during an install briefly exceeds installed size alone by roughly the download size, until cache cleanup.

You might also need