LinuxCommandLibrary

dh

debhelper sequence executor for Debian packaging

TLDR

Execute debhelper commands sequentially

$ dh [sequence]
copy
Build package with debhelper
$ dh build
copy
Clean build artifacts
$ dh clean
copy
Run with verbose output
$ dh [sequence] --verbose
copy
List all commands in sequence
$ dh [sequence] --no-act
copy
Skip specific commands
$ dh [sequence] --until [dh_auto_configure]
copy

SYNOPSIS

dh sequence [options] [debhelper-options]

DESCRIPTION

dh is the debhelper sequence executor that runs a series of dh_* commands in the correct order for building Debian packages. It simplifies debian/rules files by automatically determining which commands to run.
The tool reads debian/rules overrides to customize behavior. Override targets (overridedh*) in debian/rules let maintainers modify specific steps. Addon support extends functionality for specific packaging scenarios.
dh significantly reduces boilerplate in debian/rules, replacing explicit command lists with simple sequence invocations that automatically handle most packaging tasks.

PARAMETERS

SEQUENCE

Build sequence: build, clean, install, binary, etc.
--verbose
Enable verbose mode for all commands.
--no-act, -n
Show what would be done without executing.
--with ADDON
Use specified addon (e.g., python3, systemd).
--without ADDON
Disable specified addon.
--until CMD
Run until specified command.
--after CMD
Start after specified command.
--help
Display help information.

CAVEATS

Behavior depends on debhelper compatibility level (set in debian/compat or Build-Depends). Override syntax varies between compat levels. Some packages require explicit command sequences.

HISTORY

dh was introduced in debhelper v7 (2008) by Joey Hess to simplify Debian packaging. It enabled the "dh short form" rules files that dramatically reduced packaging complexity.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community