Skip to content

Debian — The Swiss Army Knife of Linux

Debian isn’t the flashiest distribution, but it’s the most reliable foundation in the Linux world. Behind it stands the largest community of volunteer developers, and behind its track record are decades of uninterrupted operation on servers, embedded systems, and cloud infrastructure. If you manage Linux machines in production, Debian (or one of its derivatives) is already in your stack — whether you’ve acknowledged it or not.

Managing Packages: apt and dpkg

Two tools form the core of Debian’s packaging system. apt is the high-level interface for working with repositories, resolving dependencies, and upgrading the system. dpkg is the low-level engine that installs, removes, and inspects individual .deb files without contacting repositories.

# Update index and upgrade system
apt update
apt upgrade -y
apt full-upgrade -y

# Install and remove
apt install -y nginx
apt remove --purge nginx
apt autoremove -y

# Search and inspect
apt search nginx
apt show nginx
apt list --installed | grep nginx

# dpkg for direct .deb manipulation
dpkg -i package.deb
dpkg -l | grep nginx
dpkg -L nginx
dpkg -S /usr/bin/nginx
Warning

dpkg -i does not resolve dependencies. If a package pulls in other libraries, use apt install ./package.deb instead — apt will fetch missing dependencies from the repository.

A common mistake is mixing apt and dpkg during partial installations. If dpkg -i fails with a dependency error, run apt --fix-broken install and complete the operation through apt.

Stability Model and Release Branches

Debian is built on three branches that determine the aggressiveness of updates and the level of testing.

BranchCodenameStabilityWhen to Use
stablebookworm (12) / trixie (13)High — security and critical fixes onlyProduction servers, base infrastructure
testingbookworm-progressMedium — packages go through a stabilization periodDevelopment machines, containers
unstablesidLow — daily snapshotsExperiments, binary package building

In sources.list this looks like:

# Stable — recommended for production
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
Note

The non-free and non-free-firmware sections were introduced starting with Debian 12. Without them, certain proprietary drivers (Wi-Fi, GPU) won’t install.

Moving between branches is apt dist-upgrade with a swapped sources.list. Do this only on test benches — binary compatibility between testing and stable is not guaranteed for all packages.

Architecture Support

Debian officially supports more hardware platforms than any other distribution. This is critical for embedded and IoT projects.

ArchitecturePortTypical Use
amd64amd64Servers, desktops, cloud
arm64arm64ARM servers (AWS Graviton, Raspberry Pi 4/5)
armhfarmhfEmbedded devices with FPU
i386i386Legacy systems
ppc64elppc64elIBM Power Systems
s390xs390xIBM Z mainframes
riscv64riscv64Open RISC-V platforms

Multi-architecture support allows installing packages for foreign platforms:

dpkg --add-architecture arm64
apt update
apt install -y package:arm64

Debian as a Base for Other Distributions

Nearly every major distribution you use is built on Debian or inherits its packaging model.

  • Ubuntu — takes the testing branch, adds its own PPAs and proprietary drivers.
  • Linux Mint — based on Ubuntu, and therefore on Debian packages.
  • Proxmox VE — a modified Debian 12 with added enterprise repositories.
  • Kali Linux — Debian unstable with a suite of pentesting tools.
  • Raspberry Pi OS (formerly Raspbian) — Debian armhf/arm64 with Pi-specific patches.
  • MX Linux, antiX — Debian stable with lightweight desktop environments.
Tip

If you need a stable backend with fresher software, use Debian stable with the backports repository. This gives you updated kernel, nginx, PostgreSQL versions without switching to testing.

echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list
apt update
apt install -t bookworm-backports linux-image-amd64

Practical DevOps Scenarios

In day-to-day work, the Debian approach manifests in several key patterns.

Base container images. Official Docker images like debian:bookworm, debian:slim are the starting point for hundreds of minimalist containers. debian:slim weighs around 70 MB compared to 200+ MB for ubuntu:latest.

FROM debian:slim
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*

VM templates. Proxmox, which runs on Debian, uses debootstrap to create LXC container templates. It is the same tool that underlies a fresh system installation.

Configuration management. Ansible, Puppet, Chef — all three work directly with Debian packages. The apt module in Ansible is one of the most-used modules in any playbook.

CI/CD pipelines. Building .deb packages in GitLab CI or GitHub Actions is a standard pattern. debhelper, dh_make, pbuilder, or sbuild provide reproducible builds in a clean chroot.

Key Commands for Daily Work

Bookmark this table — it covers 90% of tasks on a Debian server.

TaskCommand
Update package listapt update
Upgrade all packagesapt upgrade -y
Full upgrade resolving dependenciesapt full-upgrade -y
Install a packageapt install -y <pkg>
Remove a package with configsapt purge -y <pkg>
Search for a packageapt search <query>
Show package infoapt show <pkg>
List installed packagesapt list --installed
Find which package owns a filedpkg -S <path>
List files in a packagedpkg -L <pkg>
Check package statusdpkg -l <pkg>
Fix broken dependenciesapt --fix-broken install
Clean apt cacheapt clean && apt autoclean
Add an architecturedpkg --add-architecture <arch>
Build .deb from sourcedebuild -us -uc

Debian isn’t the fastest at first glance — no rolling releases and no fresh software versions out of the box. But that predictability is exactly what makes it the foundation for production environments running millions of servers. If you want reliability over trending versions, Debian won’t let you down.