OS Manuals

/usr/bin/dpkg-buildpackage

headers for dpkg

From dpkg-dev 1.23.11-r3 (os), captured 2026-11-05 by running dpkg-buildpackage --help (exit 0). permalink

Usage: dpkg-buildpackage [<option>...] [--] [<filename.dsc>|<directory>]

Options:
      --build=<type>[,...]
          Specify the build <type>: full, source, binary, any, all.
          [default: full]
  -F, --build=full
          Specify a full, source and binary build (default behavior).
  -g, --build=source,all
          Specify a source and arch-indep build.
  -G, --build=source,any
          Specify a source and arch-specific build.
  -b, --build=binary
          Specify a binary-only, no source files build.
  -B, --build=any
          Specify a binary-only, only arch-specific files build.
  -A, --build=all
          Specify a binary-only, only arch-indep files build.
  -S, --build=source
          Specify a source-only, no binary files build.
  -nc, --no-pre-clean
          Do not pre-clean source tree (implies --build=binary).
      --pre-clean
          Pre-clean source tree (default behavior).
      --no-post-clean
          Do not post-clean source tree (default behavior).
  -tc, --post-clean
          Post-clean source tree.
      --sanitize-env
          Sanitize the build environment.
  -D, --check-builddeps
          Check build dependencies and conflicts (default behavior).
  -d, --no-check-builddeps
          Do not check build dependencies and conflicts.
      --ignore-builtin-builddeps
          Do not check builtin build dependencies.
  -P, --build-profiles=<profiles>
          Assume comma-separated build <profiles> as active.
          [env: DEB_BUILD_PROFILES=]
  -R, --rules-file=<rules>
          Rules file to execute.
          [default: debian/rules]
  -T, --rules-target=<target>
          Call <rules> <target>.
      --as-root
          Ensure --rules-target calls the target with root rights.
      --rules-requires-root
          Assume legacy Rules-Requires-Root field value.
  -r, --root-command=<command>
          Command to gain root rights.
          [default: fakeroot]
  -j, --jobs[=<jobs>|auto]
          Jobs to run simultaneously in opt-in mode (passed to <rules>),
          (default behavior).
          [default: auto]
  -J, --jobs-try[=<jobs>|auto]
          Alias for -j, --jobs.
      --jobs-force[=<jobs>|auto]
          Jobs to run simultaneously in forced mode (passed to <rules>).
          [default: auto]
      --hook-<name>=<command>
          Set <command> as the hook <name>, known hooks:
             preinit init preclean source build binary
             buildinfo changes postclean check sign done
      --check-command=<command>
          Command to check the .changes file.
          [env: DEB_CHECK_COMMAND=]
      --check-option=<opt>
          Pass <opt> to check <command>.
      --buildinfo-file=<file>
          Set the .buildinfo filename to generate.
      --buildinfo-option=<opt>
          Pass option <opt> to dpkg-genbuildinfo.
      --changes-file=<file>
          Set the .changes filename to generate.
      --sign-backend=<backend>
          OpenPGP backend to use to sign.
          [default: auto]
  -p, --sign-command=<command>
          Command to sign .dsc and/or .changes files.
          [default: auto]
      --sign-keyfile=<file>
          The key file to use for signing.
          [env: DEB_SIGN_KEYFILE=]
  -k, --sign-keyid=<keyid>
          The key id to use for signing.
          [env: DEB_SIGN_KEYID=]
      --sign-key=<keyid>
          Deprecated alias for --sign-keyid.
  -ap, --sign-pause
          Add pause before starting signature process.
  -us, --unsigned-source
          Do not sign the .dsc file.
  -ui, --unsigned-buildinfo
          Do not sign the .buildinfo file.
  -uc, --unsigned-changes
          Do not sign the .buildinfo and .changes files.
      --no-sign
          Do not sign any file.
      --force-sign
          Force signing the resulting files.
      --admindir=<directory>
          Change the administrative directory.
  -?, --help
          Show this help message.
      --version
          Show the version.

Options passed to dpkg-architecture:
  -a, --host-arch <arch>
          Set the host Debian architecture.
  -t, --host-type <type>
          Set the host GNU system type.
      --target-arch <arch>
          Set the target Debian architecture.
      --target-type <type>
          Set the target GNU system type.

Options passed to dpkg-genchanges:
  -si
          Source includes original source, if new upstream (default behavior).
  -sa
          Source includes original source, always.
  -sd
          Source is diff and .dsc only.
  -v<version>
          Include all changes later than <version>.
  -m, --source-by=<maint>
          Maintainer for this source or build is <maint>.
      --build-by=<maint>
          Alias for --source-by.
  -e, --release-by=<maint>
          Maintainer for this change or release is <maint>.
      --changed-by=<maint>
          Alias for --release-by.
  -C<descfile>
          Changes are described in <descfile>.
      --changes-option=<opt>
          Pass option <opt> to dpkg-genchanges.

Options passed to dpkg-source:
  -sn
          Force Debian native source format.
  -s[sAkurKUR]
          See dpkg-source for explanation.
  -Z, --compression=<compressor>
          Compression to use for source (supported are: bzip2, gzip, lzma, xz).
          [default: xz]
  -z, --compression-level=<level>
          Compression level to use for source.
  -i, --diff-ignore[=<regex>]
          Ignore diffs of files matching <regex>.
  -I, --tar-ignore[=<pattern>]
          Filter out files when building tarballs.
      --source-option=<opt>
          Pass option <opt> to dpkg-source.
Options (79)
OptionDescriptionSource
--build typeSpecifies the build type from a comma-separated list of components.help + man
-nc, --no-pre-cleanDo not pre-clean source tree (implies --build=binary).help + man
--pre-cleanPre-clean source tree (default behavior).help + man
--no-post-cleanDo not clean the source tree after the package has been built.help + man
-tc, --post-cleanClean the source tree (using gain-root-command debian/rules clean) after the package has been built.help + man
--sanitize-envSanitize the build environment.help + man
-D, --check-builddepsCheck build dependencies and conflicts (default behavior).help + man
-d, --no-check-builddepsDo not check build dependencies and conflicts.help + man
--ignore-builtin-builddepsDo not check built-in build dependencies and conflicts.help + man
-P, --build-profiles profilesAssume comma-separated build <profiles> as active.help
-R, --rules-file rulesBuilding a Debian package usually involves invoking debian/rules as a command with several standard parameters.help + man
-T, --rules-target targetCall <rules> <target>.help
--as-rootEnsure --rules-target calls the target with root rights.help + man
--rules-requires-rootDo not honor the Rules-Requires-Root field, falling back to its legacy default value binary-targets.help + man
-r, --root-command commandWhen dpkg-buildpackage needs to execute part of the build process as root, it prefixes the command it executes with gain-root-command if one has been specified.help + man
-j, --jobs jobs>|autoJobs to run simultaneously in opt-in mode (passed to <rules>), (default behavior).help
-J, --jobs-try jobs>|autoAlias for -j, --jobs.help
--jobs-force jobs>|autoJobs to run simultaneously in forced mode (passed to <rules>).help
--hook- name>=<commandSet <command> as the hook <name>, known hooks: preinit init preclean source build binary buildinfo changes postclean check sign donehelp
--check-command commandCommand used to check the .changes file itself and any artifact built referenced in the file.help + man
--check-option optPass option opt to the check-command specified with DEB_CHECK_COMMAND or --check-command.help + man
--buildinfo-file fileSet the filename for the generated .buildinfo file.help + man
--buildinfo-option optPass option <opt> to dpkg-genbuildinfo.help + man
--changes-file fileSet the filename for the generated .changes file.help + man
--sign-backend backendSpecify an OpenPGP backend interface to use when invoking the sign-command.help + man
-p, --sign-command commandWhen dpkg-buildpackage needs to execute an OpenPGP backend command to sign a source control (.dsc) file, a .buildinfo file or a .changes file it will run sign-command (searching the PATH if…help + man
--sign-keyfile fileSpecify an OpenPGP key-file containing the secret key to use when signing packages.help + man
-k, --sign-keyid keyidSpecify an OpenPGP key-ID (either a fingerprint or a user-ID) for the secret key to use when signing packages.help + man
--sign-key keyidDeprecated since dpkg 1.23.8, replaced by --sign-keyid.help + man
-ap, --sign-pauseAdd pause before starting signature process.help
-us, --unsigned-sourceDo not sign the source package.help + man
-ui, --unsigned-buildinfoDo not sign the .buildinfo file.help + man
-uc, --unsigned-changesDo not sign the .buildinfo and .changes files.help + man
--no-signDo not sign any file, this includes the source package, the .buildinfo file and the .changes file.help + man
--force-signForce the signing of the resulting files, regardless of -us, --unsigned-source, -ui, --unsigned-buildinfo, -uc, --unsigned-changes or other internal heuristics.help + man
--admindir directoryChange the administrative directory.help + man
-?, --helpShow the usage message and exit.help + man
--versionShow the version and exit.help + man
-a, --host-arch archSpecify the Debian architecture we build for.help + man
-t, --host-type typeSpecify the GNU system type we build for.help + man
--target-arch archSpecify the Debian architecture the binaries built will build for.help + man
--target-type typeSpecify the GNU system type the binaries built will build for.help + man
-siSource includes original source, if new upstream (default behavior).help + man
-saSource includes original source, always.help + man
-sdSource is diff and .dsc only.help + man
-v versionInclude all changes later than <version>.help
-m, --source-by maintMaintainer for this source or build is <maint>.help + man
--build-by maintAlias for --source-by.help + man
-e, --release-by maintMaintainer for this change or release is <maint>.help + man
--changed-by maintPass as -e to dpkg-genchanges.help + man
-C descfileChanges are described in <descfile>.help
--changes-option optPass option <opt> to dpkg-genchanges.help + man
-snForce Debian native source format.help + man
-s sAkurKURSee dpkg-source for explanation.help
-Z, --compression compressorCompression to use for source (supported are: bzip2, gzip, lzma, xz).help + man
-z, --compression-level levelCompression level to use for source.help + man
-i, --diff-ignore regexIgnore diffs of files matching <regex>.help
-I, --tar-ignore patternFilter out files when building tarballs.help
--source-option optPass option <opt> to dpkg-source.help + man
-gEquivalent to --build=source,all. (in the manual page but not in --help)man
-GEquivalent to --build=source,any. (in the manual page but not in --help)man
-bEquivalent to --build=binary or --build=any,all. (in the manual page but not in --help)man
-BEquivalent to --build=any. (in the manual page but not in --help)man
-AEquivalent to --build=all. (in the manual page but not in --help)man
-SEquivalent to --build=source. (in the manual page but not in --help)man
-FEquivalent to --build=full, --build=source,binary or --build=source,any,all. (in the manual page but not in --help)man
-vversion (in the manual page but not in --help)man
-Cchanges-description (in the manual page but not in --help)man
-mmaintainer-address (in the manual page but not in --help)man
-emaintainer-addressPassed unchanged to dpkg-genchanges. (in the manual page but not in --help)man
--hook-hook-name hook-commandSet the specified shell code hook-command as the hook hook-name, which will run at the times specified in the run steps. (in the manual page but not in --help)man
-ss (in the manual page but not in --help)man
-sA (in the manual page but not in --help)man
-sk (in the manual page but not in --help)man
-su (in the manual page but not in --help)man
-sr (in the manual page but not in --help)man
-sK (in the manual page but not in --help)man
-sU (in the manual page but not in --help)man
-sR[-i, --diff-ignore[=regex]](#i) (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.