A software repository, or repo for short, is a storage location for software packages. Often a table of contents is also stored, along with metadata. A software repository is typically managed by source or version control, or repository managers. Package managers allow automatically installing and updating repositories, sometimes called "packages".

Overview Many software publishers and other organizations maintain servers on the Internet for this purpose, either free of charge or for a subscription fee. Repositories may be solely for particular programs, such as CPAN for the Perl programming language, or for an entire operating system. Operators of such repositories typically provide a package management system, tools intended to search for, install and otherwise manipulate software packages from the repositories. For example, many Linux distributions use Advanced Packaging Tool (APT), commonly found in Debian based distributions, or Yellowdog Updater, Modified (yum) found in Red Hat based distributions. There are also multiple independent package management systems, such as pacman, used in Arch Linux and equo, found in Sabayon Linux.

As software repositories are designed to include useful packages, major repositories are designed to be malware free. If a computer is configured to use a digitally signed repository from a reputable vendor, and is coupled with an appropriate permissions system, this significantly reduces the threat of malware to these systems. As a side effect, many systems that have these abilities do not need anti-malware software such as antivirus software.itmWEB: Coping with Computer Viruses

Most major Linux distributions have many repositories around the world that mirror the main repository.

At client side, a package manager helps installing from and updating the repositories.

Package management system vs. package development process

A package management system is different from a package development process.

A typical use of a package management system is to facilitate the integration of code from possibly different sources into a coherent stand-alone operating unit. Thus, a package management system might be used to produce a distribution of Linux, possibly a distribution tailored to a specific restricted application.

A package development process, by contrast, is used to manage the co-development of code and documentation of a collection of functions or routines with a common theme, producing thereby a package of software functions that typically will not be complete and usable by themselves. A good package development process will help users conform to good documentation and coding practices, integrating some level of unit testing.

Selected repositories

The following table lists a few languages with repositories for contributed software. The "Autochecks" column describes the routine checks done.

Language, purpose Package development process Repository Install methods C/C++ vcpkg Conan Common Lisp Quicklisp DDUBdlang.orgdub add <package>DartFlutterpub.devflutter pub get <package>FortranFortran Package Manager (fpm)Gogopkg.go.devgo get <package> Haskell Common Architecture for Building Applications and Libraries Hackage Cabal Java, Kotlin, Scala, Groovy, Clojure, etc. Maven Maven, Apache Ivy, Gradle, sbt JavaScript, TypeScript, Node.jsnode npm registry npm install <package>yarn add <package> Bower bower install <package> Julia .NET NuGet NuGet dotnet add package <package> Ocaml OPAM Perl CPAN PPM PHP PEAR, Composer PECL, Packagistcomposer require <package> pear install <package> PowerShell PowerShell Gallery PSResourceGet Python Setuptools, Poetry PyPI pip, EasyInstall, PyPM, Poetry, uv Conda R R CMD check process CRAN install.packagesremotes Ruby RubyGems RubyGems RubyGems, Bundler Rust Cargo crates.io Cargo Swift Swift Package Manager TeX, LaTeX CTAN (Parts of this table were copied from a "List of Top Repositories by Programming Language" on Stack Overflow)

Notable repositories with limited scope include: Netlib, mainly mathematical routines for Fortran and C, historically one of the first open software repositories; Boost, a strictly curated collection of high-quality libraries for C++; some code developed in Boost later became part of the C++ standard library.

Package managers

Package managers help manage repositories and the distribution of them. If a repository is updated, a package manager will usually allow a user to update that repository through the manager. It also helps to manage things such as dependencies between other repositories. Examples of managers include: +Popular package managersPackage managerDescriptionnpmManager for Node.jspipInstaller for PythonAPTManager for DebianHomebrewInstaller for macOS, allows installing packages that Apple did notvcpkgManager for C, C++yum and DNFManager for Fedora, Red Hat Enterprise LinuxPacmanManager for Arch LinuxComposerManager for PHP

Repository managers In an enterprise environment, a software repository is usually used to store artifacts, or to mirror external repositories which may be inaccessible due to security restrictions. Such repositories may provide additional functionality, like access control, versioning, security checks for uploaded software, cluster functionality etc. and typically support a variety of formats in one package, so as to cater for all the needs in an enterprise, and thus aiming to provide a single point of truth. One example is Sonatype Nexus Repository.

At server side, a software repository is typically managed by source control or repository managers. Some of the repository managers allow to aggregate other repository location into one URL and provide a caching proxy. When doing continuous builds many artifacts are produced and often centrally stored, so automatically deleting the ones which are not released is important.

Relationship to continuous integration As part of the development lifecycle, source code is continuously being built into binary artifacts using continuous integration. This may interact with a binary repository manager much like a developer would by getting artifacts from the repositories and pushing builds there. Tight integration with CI servers enables the storage of important metadata such as: Which user triggered the build (whether manually or by committing to revision control) Which modules were built Which sources were used (commit id, revision, branch) Dependencies used Environment variables Packages installed

Artifacts and packages Artifacts and packages inherently mean different things. Artifacts are simply an output or collection of files (ex. JAR, WAR, DLLS, RPM etc.) and one of those files may contain metadata (e.g. POM file). Whereas packages are a single archive file in a well-defined format (ex. NuGet) that contain files appropriate for the package type (ex. DLL, PDB). Many artifacts result from builds but other types are crucial as well. Packages are essentially one of two things: a library or an application.

Compared to source files, binary artifacts are often larger by orders of magnitude, they are rarely deleted or overwritten (except for rare cases such as snapshots or nightly builds), and they are usually accompanied by much metadata such as id, package name, version, license and more.

Metadata Metadata describes a binary artifact, is stored and specified separately from the artifact itself, and can have several additional uses. The following table shows some common metadata types and their uses: Metadata type Used for Versions available Upgrading and downgrading automatically Dependencies Specify other artifacts that the current artifact depends on Downstream dependencies Specify other artifacts that depend on the current artifact License Legal compliance Build date and time Traceability Documentation Provide offline availability for contextual documentation in IDEs Approval information Traceability Metrics Code coverage, compliance to rules, test results User-created metadata Custom reports and processes

See also

Package manager RPM Package Manager Synaptic (software) FreeBSD Ports Definitive media library dpkg Simtel

References