LinuxCommandLibrary

debchange

Update Debian changelog files

TLDR

Add a new version for a non-maintainer upload to the changelog

$ debchange [[-n|--nmu]]
copy

Add a changelog entry to the current version
$ debchange [[-a|--append]]
copy

Add a changelog entry to close the bug with specified ID
$ debchange --closes [bug_id]
copy

SYNOPSIS

debchange [option…] [new-version]

PARAMETERS

-b, --bin-nmu
    Create bin-NMU changelog entry

-c, --confirm
    Confirm changes before writing

-C, --create[=NAME]
    Create new changelog file

--check-dir[=DIR]
    Check parent directory before acting

-D, --distribution[=DIST]
    Set distribution (e.g., unstable)

-i, --interactive
    Interactive mode for changelog text

-l, --local[=REVISION]
    Append local revision to version

-m, --maintainer[=NAME]
    Override maintainer name

--multimaint-merges[=FILE]
    Use multimaint merges file

--no-multimaint
    Skip multimaint-merge paragraph

-n, --no-confirm
    Write without confirmation

--no-reopen-bugs
    Don't reopen bugs in new entry

-r, --release[=RELEASE]
    Set release codename (e.g., bookworm)

-u, --user[=USER]
    Set username for changelog dates

-v, --newversion[=VERSION]
    Set explicit new version number

--help
    Display usage summary

--version
    Show program version

DESCRIPTION

debchange (commonly invoked as dch) is a key tool from the devscripts package for Debian package maintainers. It automates editing the debian/changelog file, which documents package versions, changes, distributions, maintainers, and bug fixes per Debian Policy.

The command adds new entries with proper formatting, including timestamps, maintainer info, urgency levels, and distribution tags (e.g., unstable, experimental). It parses existing changelogs for consistency, supports version bumping, bin-NMUs, and interactive prompts.

Ideal for daily packaging workflows, it reduces manual errors in changelog syntax, crucial for dpkg-source and repository uploads. Options allow scripting builds or guided input, making it essential for Debian derivatives like Ubuntu too.

Run from package root; it checks for debian/changelog presence.

CAVEATS

Must run from Debian source root with debian/changelog; overwrites without backup unless confirmed. Not for non-Debian changelogs.

COMMON USAGE

dch -r … add entry for current release
dch --create … new changelog
dch -i -D experimental … interactive experimental entry

CHANGELOG LOCATION

Defaults to debian/changelog; use DPKG_CHANGELOG env var to override.

HISTORY

Introduced in devscripts ~2000 for Debian devs; evolved with policy changes (e.g., bin-NMU support in 2004). Maintained by Debian Med team.

SEE ALSO

dch(1), dpkg-parsechangelog(1), dpkg-source(1)

Copied to clipboard