Search⌘ K
AI Features

Extracting the Debian Package

Explore how Debian packages are structured, including their filename components and internal archives. Learn to extract these packages using ar and tar commands to examine metadata files and installation contents, enabling a deeper understanding of package components and management.

Debian packages are in a binary format, so looking at them in a text editor wouldn’t make any sense. However, the format is based on open standards, with tools available to inspect and create these packages.

The file name

At the time of writing this content, the link https://packages.debian.org/stretch/bash was used to download the current version of a package for the amd64 architecture from one of the mirrors.

The downloaded file has the name bash_4.4-5_amd64.deb. There are four parts to this file name:

  • The package name bash.
  • The version number 4.4-5.
  • The architecture amd64.
...