Package management

From LQWiki
(Redirected from PackAge manager)
Jump to navigation Jump to search


Most Linux systems organize their component programs into software packages, each of which is comprised of one or more related programs and associated configuration or metadata files. As it happens, there are a number of more or less incompatible kinds of package, each with its own package manager program(s).

Package Managers

A package manager is simply a program that installs, updates or removes a software package from an installed Linux distribution. A package manager normally works with a particular package format. It does this by reading the package metadata that describes the package's contents. See the Installing software page for more details.

Software Packages

Packages are a method for distributing software. The purpose of a package is to wrap up all of the files belonging to one piece of software into a single file. A software package is essentially an archive file with some metadata describing the contents of the package, like for example, the name of the package, a description of the package, a file list, etc.

Package management takes this concept a step further by adding dependencies, install and uninstall scripts, default configurations, and version management. For linux, packages generally fall into three major and mostly incompatible package formats:

The Red Hat format is the most widespread format, found in Red Hat, Mandrake and many other distributions. The Debian format has gained popularity recently thanks to Debian-based distributions such as Knoppix. Slackware recently added scripts for installation and upgrading to newer versions of packages without destroying configuration files. Some Linux distributions have their own software package formats that other distributions don't use themselves, along with their own "homespun" package manager to deal with such a format.

Software Repository

A software repository (often called a "repo") is simply a collection of software packages, normally provided by a particular Linux distribution and stored on a server. While it's possible to have a "local" repository, most are online repositories called "mirrors". Online software repositories normally contain thousands of software packages that form an entire Linux distribution. An example of a "local" repository could be a DVD containing all of the required packages needed to install an entire Linux distribution, including any optional software provided in its DVD repository(s).


Most Linux distributions "mirror" their software repositories, this means that multiple servers host a complete copy of a distribution's software repositories. Often package managers will try to find the closest and/or fastest "mirror" available, and then will download packages to be installed or updated from that mirror.

Some of the most common formats

  1. RPM (RedHat Package Manager): used on RedHat, Fedora, CentOS, OpenSUSE and other distributions.
  2. .deb: used on Debian and derivative distributions such as Ubuntu, Linux Mint as well as other distributions.
  3. portage: used on Gentoo

See also