Software package

On this page 7

A software package is a distributable archive that bundles program files with machine-readable metadata, such as name, version, architecture, dependencies and installation scripts, so that an installer or package manager can install, upgrade, verify and remove the software in a consistent way. In the field of Installation & packages, it is the basic unit in which software is delivered to a system.

The concept separates what is installed from how it is installed. A package does not simply copy files; it declares which other components it needs, where its files belong and what must happen before or after installation. That declaration lets tools keep hundreds or thousands of installed programs consistent, upgradable and removable.

What a software package contains

Almost every package format combines a payload with a manifest. The payload holds the actual files, while the manifest describes them precisely enough for automated tools to act without human judgment.

PartContentPurpose
PayloadExecutables, libraries, data and documentationThe software itself
Name and versionIdentifier and version numberUpgrade decisions and comparisons
Dependency listRequired packages with version rangesAutomatic installation of prerequisites
Conflicts and providesPackages it replaces or cannot coexist withAvoids broken combinations
Maintainer scriptsPre-install, post-install and removal stepsCreates users, services or caches
Checksums and signatureHashes and cryptographic signatureIntegrity and authenticity checks
Typical parts of a software package

The manifest also records the target architecture, such as x86-64 or ARM64, and sometimes the minimum operating system version. A package built for the wrong architecture is rejected before any file is written, which is one of the simplest but most valuable safety checks in the format.

Common package formats

Package formats evolved separately for operating systems and programming ecosystems, so the same idea appears under many names and file extensions. The table below groups the most widely used formats by their scope.

FormatEcosystemTypical toolScope
.debDebian, Ubuntuapt, dpkgSystem packages
.rpmFedora, RHEL, openSUSEdnf, zypper, rpmSystem packages
MSI and MSIXWindowsWindows Installer, wingetApplications
.pkgmacOSInstaller, HomebrewApplications and tools
Flatpak and SnapCross-distribution Linuxflatpak, snapSandboxed desktop apps
WheelPythonpipLanguage libraries
npm packageJavaScriptnpm, pnpm, yarnLanguage libraries
Container imageOCI-compatible runtimesDocker, PodmanWhole application environments
Widely used package formats

Language packages such as wheels and npm packages install into a project or user environment, while system packages install into the operating system. Mixing the two, for example installing Python libraries system-wide with pip over distribution packages, is a frequent source of conflicting files.

Binary and source packages

Packages come in two fundamental forms. A binary package contains compiled files ready to install, while a source package contains the source code and a recipe for building it. Distributions build binary packages from source packages in controlled build environments.

AspectBinary packageSource package
Installation speedFast, files are prebuiltSlow, requires compilation
Hardware specificityBuilt for one architectureBuilds for many architectures
CustomizationFixed build optionsOptions chosen at build time
ReproducibilityDepends on the publisher’s buildCan be rebuilt and verified
Typical usersEnd users and serversMaintainers and source-based distributions
Binary and source packages compared

Reproducible builds aim to make the same source produce bit-identical binaries, so that anyone can confirm that a published binary package really corresponds to its source. This is an important defense against supply-chain tampering.

How packages relate to installers and package managers

A package is data, while installers and package managers are tools that act on it. The distinction matters because the same package can be installed by different tools, and a tool’s capabilities decide how safely the package is handled.

  • A package manager resolves dependencies, downloads packages from repositories, verifies signatures and tracks every installed file.
  • An installer is often a self-contained program that unpacks one product, sometimes without central tracking.
  • A portable application avoids installation entirely and runs from its folder, so it rarely uses package metadata.
  • A dependency lock file records exact package versions for a project, which makes environments reproducible.
  • Dependency resolution is the process of choosing versions that satisfy all declared constraints at once.

Repositories add a further layer: they publish signed indexes of available packages, and the package manager trusts only packages whose signatures match the repository keys configured on the system.

The package database maintained by the manager is what makes clean removal and verification possible. Because every installed file is recorded with its checksum, tools such as rpm or dpkg can report files that were modified or deleted after installation. Configuration files receive special treatment: an upgrade normally keeps local changes and stores the new default version alongside them, so administrators can merge changes deliberately.

Versioning, dependencies and common problems

Package metadata is only as useful as its version numbers and dependency declarations. Many ecosystems follow semantic versioning, where a major version change signals incompatible changes, a minor version adds features and a patch fixes bugs.

ProblemCauseRemedy
Dependency hellIncompatible version constraintsResolve conflicts or isolate environments
Broken upgradeFaulty maintainer scriptRoll back and report to the maintainer
Orphaned filesSoftware installed outside the managerInstall through the package manager only
TyposquattingMalicious package with a similar nameVerify names, publishers and signatures
Unexpected updateLoose version rangesUse version pinning or lock files
Package problems and their remedies

Security is the decisive concern for modern packages. A package runs maintainer scripts with high privileges, and language package installs may execute code at install time. Using trusted repositories, signature verification and pinned versions in production reduces this risk considerably.

A plain-language summary

A software package is like a flat-pack furniture box. It contains the parts, a list of what else you need and the assembly instructions. A computer can read all of it automatically.

Because of this, software can be installed, updated and removed cleanly. The system knows which files belong to which program. It can also fetch missing parts before anything goes wrong.

An example from practice

A system administrator needs to install a web server on twenty Ubuntu machines. Instead of downloading archives by hand, she runs one apt command through a configuration tool. The package manager reads the web server package metadata, finds that it needs several libraries, downloads all of them from the signed repository and installs them in the right order.

The post-install script creates a dedicated service account and enables the service. Three months later a security fix is published, and a single upgrade command updates every machine in minutes. When one server is retired, removing the package deletes its files cleanly, leaving only the configuration she chose to keep.