# dpkg-parsechangelog - parse Debian changelog files - man(1) - [phpMan]

[_dpkg-parsechangelog_(1)](https://www.chedong.com/phpMan.php/man/dpkg-parsechangelog/1/markdown)                       dpkg suite                       [_dpkg-parsechangelog_(1)](https://www.chedong.com/phpMan.php/man/dpkg-parsechangelog/1/markdown)

## NAME
       dpkg-parsechangelog - parse Debian changelog files

## SYNOPSIS
       **dpkg-parsechangelog **[_option_...]

## DESCRIPTION
       **dpkg-parsechangelog **reads and parses the changelog of an unpacked Debian source tree and
       outputs the information in it to standard output in a machine-readable form.

## OPTIONS
### -l --file _
           Specifies  the  changelog  file  to  read information from.  A ‘-’ can be used to specify
           reading from standard input.  The default is **debian/changelog**.

### -F _
           Specifies the format of the changelog.  By default the format is read from a special line
           near the bottom of the changelog or failing that defaults to the **debian **standard  format.
           See also "CHANGELOG FORMATS".

### -L _
           Obsolete  option  without  effect  (since  dpkg  1.18.8).   Setting  the perl environment
           variables **PERL5LIB **or **PERLLIB **has a similar effect  when  looking  for  the  parser  perl
           modules.

### -S --show-field _
           Specifies  the  name  of  the  field  to show (since dpkg 1.17.0).  The field name is not
           printed, only its value.

       **-?**, **--help**
           Show the usage message and exit.

### --version
           Show the version and exit.

### Parser Options
       The following options can be used to influence  the  output  of  the  changelog  parser,  for
       example the range of entries or the format of the output.

       **--format _**output-format_
           Set  the  output  format.   Currently  supported values are **dpkg **and **rfc822**.  **dpkg **is the
           classic output format (from before this option existed) and the default.  It consists  of
           one  stanza  in  Debian  control  format (see [**deb-control**(5)](https://www.chedong.com/phpMan.php/man/deb-control/5/markdown)).  If more than one entry is
           requested, then most fields are taken from the  first  entry  (usually  the  most  recent
           entry), except otherwise stated:

           **Source: _**pkg-name_
               The source package name.

           **Version: _**version_
               The  source  version  number.   **Note**:  For  binary-only  releases  there  might be no
               corresponding source release.

           **Distribution: _**target-distribution_
               A space-separated list of one or more distribution names where this version should be
               installed when it is uploaded.

           **Urgency: _**urgency_
               The highest urgency of all included entries is used,  followed  by  the  concatenated
               (space-separated) comments from all the versions requested.

           **Maintainer: _**author_
               The  name  and  email  address of the person who prepared these changes, they are **not**
               necessarily those of the uploader or the usual package maintainer.

           **Date: _**date_
               The date of the entry  as  a  string,  as  it  appears  in  the  changelog.   With  a
               [**strptime**(3)](https://www.chedong.com/phpMan.php/man/strptime/3/markdown)  format  "**%a,  %d  %b  %Y %T %z**", but where the day of the week might not
               actually correspond to the real day obtained from the rest of the  date  string.   If
               you  need  a  more  accurate representation of the date, use the **Timestamp **field, but
               take into account it might not be possible to map it back to the exact value in  this
               field.

           **Timestamp: _**timestamp_
               The date of the entry as a timestamp in seconds since the epoch (since dpkg 1.18.8).

           **Closes: _**bug-number_
               The Closes fields of all included entries are merged.

           **Changes: _**changelog-entries_
               The text of all changelog entries is concatenated.  To make this field a valid Debian
               control  format  multiline field empty lines are replaced with a single full stop and
               all lines is intended by one space character.   The  exact  content  depends  on  the
               changelog format.

           The **Version**, **Distribution**, **Urgency**, **Maintainer **and **Changes **fields are mandatory.

           There might be additional user-defined fields present.

           The  **rfc822  **format uses the same fields but outputs a separate stanza for each changelog
           entry so that all metadata for each entry is preserved.

### --reverse
           Include all changes in reverse order (since dpkg 1.19.1).

           **Note**: For the **dpkg **format the first entry will be the most ancient entry.

### --all
           Include all changes.  **Note**: Other options have no effect when this is in use.

### -s --since _
### -v _
           Include all changes later than _version_.

### -u --until _
           Include all changes earlier than _version_.

### -f --from _
           Include all changes equal or later than _version_.

### -t --to _
           Include all changes up to or equal than _version_.

### -c --count _
### -n _
           Include _number_ entries from the top (or the tail if _number_ is lower than 0).

### -o --offset _
           Change the starting point for **--count**, counted from the top (or the  tail  if  _number_  is
           lower than 0).

## CHANGELOG FORMATS
       It  is possible to use a different format to the standard one, by providing a parser for that
       alternative format.

       In order to have **dpkg-parsechangelog **run the new parser, a line must be included  within  the
       last   40   lines   of   the   changelog   file,   matching   the  Perl  regular  expression:
       “**\schangelog-format:\s+([0-9a-z]+)\W**”.  The part in parentheses should be  the  name  of  the
       format.  For example:

           @@@ changelog-format: _otherformat_ @@@

       Changelog format names are non-empty strings of lowercase alphanumerics (“a-z0-9”).

       If   such   a   line   exists  then  **dpkg-parsechangelog  **will  look  for  the  parser  as  a
       [**Dpkg::Changelog::_**](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AChangelog%3A%3A/markdown)Otherformat_ perl module; it is an error  for  it  not  being  present.   The
       parser  name  in  the  perl  module will be automatically capitalized.  The default changelog
       format is **debian**, and a parser for it is provided by default.

       The parser should be derived from  the  [Dpkg::Changelog](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AChangelog/markdown)  class  and  implement  the  required
       documented interface.

       If  the  changelog  format  which is being parsed always or almost always leaves a blank line
       between individual change notes, these blank lines should be stripped out, so as to make  the
       resulting output compact.

       If  the  changelog  format does not contain date or package name information this information
       should be omitted from the output.  The parser should not attempt to synthesize it or find it
       from other sources.

       If the changelog does not have the expected format the parser should error out,  rather  than
       trying to muddle through and possibly generating incorrect output.

       A changelog parser may not interact with the user at all.

## NOTES
       All **Parser Options **except for **-v **are only supported since dpkg 1.14.16.

       Short option parsing with non-bundled values available only since dpkg 1.18.0.

## ENVIRONMENT
       **DPKG_COLORS**
           Sets  the  color  mode  (since  dpkg  1.18.5).   The  currently accepted values are: **auto**
           (default), **always **and **never**.

       **DPKG_NLS**
           If set, it will be used to decide whether to activate Native Language Support, also known
           as internationalization (or i18n) support (since dpkg 1.19.0).  The accepted values  are:
           **0 **and **1 **(default).

## FILES
### debian/changelog
           The  changelog  file,  used  to  obtain  version-dependent  information  about the source
           package, such as the urgency and distribution of an upload,  the  changes  made  since  a
           particular release, and the source version number itself.

## BUGS
       The  **Maintainer  **field has a confusing name matching the field in the _debian/control_ file but
       not its exact semantics, where its meaning would be  better  represented  by  the  **Changed-By**
       field name used in the _.changes_ file.

## SEE ALSO
       [**deb-changelog**(5)](https://www.chedong.com/phpMan.php/man/deb-changelog/5/markdown).

1.22.6                                       2026-05-06                       [_dpkg-parsechangelog_(1)](https://www.chedong.com/phpMan.php/man/dpkg-parsechangelog/1/markdown)
