The most important Linux package managements are divided into two software repositories. One is the Debian Package Manager (dpkg) and the other is the RPM Package Manager (rpm). The packages are not compatible with each other, but with the program “Alien” some packages can be converted.


DPKG Package Management

This package system was developed by Ian Murdock for the Debian distribution and is also used in other Debian-based distributions such as Ubuntu, Kali Linux and Knoppix. The packages can be identified by the file extension .deb, these packed archives consist of directories and files. Before installing a package you should always check the binary compatibility, this can be found on the homepage of the package provider, on or on the website of Debian. As an example, the well-known e-mail client Mozilla Thunderbird is referred here. For package management, Debian mainly uses the program dpkg, it unpacks the files and processes the data contained in them. Especially in the beginning the APT software (Advanced Package Tool) is recommended, it is a simplified system for the use of dpkg.

Structure of the Debian Package Name

Explanation of the output
  • apparmor – Name of the software
  • 2.13.2 – Version number
  • 10 – Debian release or revision number
  • amd64 – Architecture
  • .deb – Debian

Debian Package Structure


The text file contains the version number of the package format.

Compressed archive, which contains important information about the package.

Contains a list of the configuration files of the package, for example /etc/muster.d/abstractions/samba.

Here is a short description of the package, its functions and further information like dependencies.

MD5 checksums enable the detection of manipulated files in the package.

preinst – postinst – prerm – postrm
These optional scripts are executed before and after installation or uninstallation. The prerm script stops all daemons associated with the package before uninstalling it.

This compressed archive contains the actual program data.

RPM Package Management

The term RPM Package Manager is a recursive acronym (Red Hat Package Manager), such names are not uncommon in the free software world. This package manager was developed by Red Hat and is used in distributions such as CentOS, Fedora Project, openSUSE, Red Hat Enterprise Linux and SUSE Enterprise Linux Server. These software packages are also compressed archives with directories and files, and can be recognized by the file extension .rpm. The RPM software packages are managed with the systems YUM (Yellowdog Updater, Modified), DNF (Dandified Yum), YaST (Yet another Setup Tool) and Zypper (Libzypp).

Structure of the RPM Package Name

Explanation of the output
  • gimp – Name of the software
  • 2.10.12 – Version number
  • 3.fc31 – Fedora release or revision number
  • x86_64 – Architecture
  • .rpm – Red Hat Package Manager

RPM Package Structure


cpio file (copy in, copy out). Archiving program and file format from the Unix section.

The spec file contains metadata, macro definitions and installation paths to the package. This information and instructions are divided into different sections, the % mark is used as separator.

The preamble describes the basic information about the package, e.g. name, version, release, license, etc.

The %description directive provides a longer, multi-line description of the package.

The %prep directive defines script commands to prepare the software before starting the creation process.

The %build directive defines the script commands for compiling the software in preparation for installation.

The %check directive sets script commands to self-check the program; these are executed after %build and before %install.

The %install directive defines script commands to install the binaries, for example with “make install”.

The %clean directive defines instructions on how to clean up the build root.

The %files directive contains a list of files of the package to be installed.

The %changelog directive lists the changes of the package.

In this compressed archive are the actual programme data.