Linux Logo

Operating Systems: Linux - Package Management Systems

Developers Notice: Porting your free / open-source software to Linux

The first step is to compile or make available your software for Linux. Second, depending upon the Linux distro, the software can be made available in APT (.deb) or RPM (.rpm) format.
There is also an universal package format for Linux, mostly for software that is compiled statically or does not need to compile at all. The format is either a .tar.bz2 / .tar.gz / .tar.xz archive or even an executable that will unpack itself (mostly having the .run file extension).

APT (the Debian Advanced Package Tool) - a Linux Package Management System

The APT Package Management System is used mostly by Debian Linux based distros such as: Debian Linux, Ubuntu Linux and Mint Linux.
APT is a free-software user interface that works with core libraries to handle the installation and removal of software. It relies on the concept of repositories in order to find software and resolve dependencies:
  • The user indicates one or more packages to be installed (dependencies will be added if any).
  • Each package name (.deb) is phrased as just the name portion of the package, not a fully qualified filename.
  • Notably, APT automatically gets and installs packages upon which the indicated package depends (if necessary). This was an original distinguishing characteristic of APT-based package management systems, as it avoided installation failure due to missing dependencies.
  • Another distinction is the retrieval of packages from remote repositories. APT uses a location configuration file (/etc/apt/sources.list) to locate the desired packages.
  • For advanced users, the APT provides other command options to override decisions made by apt-get's conflict resolution system.
  • APT provides a mechanism that allows the user to create an alternative installation policy for individual packages.
There are many frontends to APT of which the most popular are:
  • aptitude, a console client with CLI and ncurses-based TUI interfaces
  • Synaptic, a GTK+ graphical user interface
  • KPackage, part of KDE
  • Software Center, a GTK+ graphical user interface developed by the Ubuntu project

Example: Installing a new package on Linux with APT:

$ sudo apt-get install firefox

0 upgraded, 1 newly installed, 0 to remove

Example: Updating all the installed Packages with APT on Linux:

$ sudo apt-get update
...100%
done.

sudo apt-get upgrade
...100%
5 upgraded, 0 newly installed, 0 to remove

sudo apt-get dist-upgrade
...100%
2 upgraded, 0 newly installed, 1 to remove

RPM (the RedHat Package Manager) - a Linux Package Management System

The RPM Package Management System is used mostly by RedHat Linux based distros such as: RedHat Linux, CentOS Linux, Fedora Linux and OpenSUSE Linux.
RPM is a free and open-source package management system. The RPM file format is the baseline package format of the Linux Standard Base (LSB):
  • The user indicates one or more packages to be installed (dependencies will be added if any).
  • Each package name is phrased as just the name portion of the package, not a fully qualified filename.
  • There are separate RPM packages for sources (.src.rpm) and binaries (.rpm) as separate files.
  • RPM packages can be cryptographically verified with GPG and MD5.
  • Delta update: PatchRPMs and DeltaRPMs, the RPM equivalent of a patch file, can incrementally update RPM-installed software.
  • Automatic build-time dependency evaluation.
There are many frontends to RPM of which the most popular are:
  • yum, a console client
  • DNF, a console client based on yum, found in newer distros only
  • Smart Package Manager, available for many distributions including Fedora
  • apt-rpm, a port of Debian's Advanced Packaging Tool (APT)

Example: Installing a new package on Linux with APT:

$ sudo yum install firefox

Complete!

Example: Updating all the installed Packages with APT on Linux:

$ sudo yum update
...updated
done.