Package Dependency Calculator
Calculate total download size and install order for a package and its dependency tree.
About Package Dependency Calculator
Installing a package can pull in far more than its directly declared dependencies: each direct dependency may itself require further packages (transitive dependencies), and the full closure is what the package manager (apt, dnf/yum, zypper) must resolve and potentially download. The actual disk and download impact of an installation is driven by how many of those total dependencies are not already satisfied by existing installed packages — a system with substantial overlapping dependencies already present will see a much smaller effective install size than the raw total dependency count implies.
Formula
Total dependencies
total_deps = direct_deps + transitive_deps; new_installs = total_deps − already_installed
Worked example
With the default values below, Package Dependency Calculator returns Total Dependencies (Direct + Transitive) of 30. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Direct Dependenciesminimum 0
- 8
- Transitive (Indirect) Dependenciesminimum 0
- 22
- Avg Package Install Size (MB)minimum 0.01
- 3.5
- Dependencies Already Satisfied/Installedminimum 0
- 12
Results
- Total Dependencies (Direct + Transitive)
- 30
- Estimated Additional Install Size (MB)
- 63.0
- New Packages to Install
- 18
- Transitive Share of Total Deps (%)
- 73.3%
Step by step
- 1Values used
- 2Total dependencies
- 3Total Dependencies (Direct + Transitive)= 30
- 4Estimated Additional Install Size (MB)= 63.0
- 5New Packages to Install= 18
- 6Transitive Share of Total Deps (%)= 73.3
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How do I view a package's full transitive dependency tree before installing?
On Debian/Ubuntu, `apt-cache depends --recurse --no-recommends <package>` lists the full tree; a dry-run `apt-get install --dry-run <package>` shows exactly what would be newly installed. On Fedora/RHEL, `dnf repoquery --requires --resolve <package>` or `dnf install --assumeno <package>` serve the same purpose.
Why can two packages with the same declared direct dependency count have very different install sizes?
Install size depends on how many of those dependencies are already satisfied by packages already on the system, plus the actual size of each dependency package — a package depending on already-installed common libraries (glibc, openssl) pulls in far less than one depending on niche libraries unique to it.
What's the risk of a package with a very deep transitive dependency tree?
Beyond larger install footprint, deep dependency trees increase the surface area for version conflicts (dependency hell), make the package manager's SAT-solving slower, and mean a security vulnerability in any transitive dependency indirectly affects every package that pulls it in.
Related Calculators
You might also need
- Repository Mirror CalculatorCommonly used together
- Package Size CalculatorCommonly used together
- Module Dependency CalculatorCommonly used together
- Server Consolidation CalculatorCommonly used together
- YUM DNF Cache CalculatorAlso in System Administration
- Update Time EstimatorAlso in System Administration
