Build vs Runtime Dependency

Not every dependency a piece of software has is needed at the same time. Some are required only to build the software from source, such as compilers, header files, and development tools. Others are required whenever the software actually runs, such as shared libraries and language runtimes. Package managers track these two kinds separately because confusing them wastes space and breaks installs.

The Debian Policy Manual draws this line precisely. For runtime, the Depends field “declares an absolute dependency,” and “a package will not be configured unless all of the packages listed in its Depends field have been correctly configured.” For build time, it provides a separate mechanism: “source packages that require certain binary packages to be installed or absent at the time of building the package may declare relationships to those binary packages,” expressed through Build-Depends.

The practical payoff is that a user installing a finished program only needs its runtime dependencies, not the heavy toolchain used to produce it. A machine can run a compiled application without ever installing the compiler that built it, which keeps installations lean and keeps build-only tools off production systems.

The same separation appears across ecosystems under different names. Build tools distinguish compile-time and runtime scopes, and language package managers commonly separate ordinary dependencies from development-only dependencies used for building and testing. The underlying idea is constant: a dependency’s role depends on when it is needed, and tracking that role lets each environment install only what it requires.

Sources

Last verified June 8, 2026