dh_lintian - Linux


dh_lintian is a command-line tool used in Debian packaging to check the quality of Debian source packages. It runs Lintian, a linter for Debian packages, and helps identify potential issues or problems with the package.


dh_lintian [options]


  • -b, –build: Build the package before running Lintian.
  • -f, –format=FORMAT: Output format (defaults to "plain").
  • -g, –gpg-check: Check GPG signatures of the package.
  • -h, –help: Display usage information.
  • -n, –no-check: Don’t build or check the package.
  • -p, –pedantic: Use stricter checking rules.
  • -q, –quiet: Suppress output.
  • -v, –verbose: Enable verbose output.
  • -w, –warnings-as-errors: Treat warnings as errors.
  • –show-details: Show details of each check.
  • –show-tags: Show the tags associated with each check.


Simple usage:


Build the package and check with pedantic rules:

dh_lintian -bp

Check the package without building it:

dh_lintian -n

Common Issues

  • Missing dependencies: Ensure all dependencies required by the package are installed.
  • Incorrect version numbers: Verify that version numbers in the package control file match the actual package contents.
  • Unsigned source packages: Sign source packages before uploading them to a repository.


Combine with dpkg-buildpackage:

dpkg-buildpackage -us -uc | dh_lintian -

Use in a Git pre-commit hook:

git config --local hooks.pre-commit "./debian/hooks/pre-commit"

Related Commands

  • lintian: Debian package linter
  • dh: Debian helper program
  • dpkg-buildpackage: Debian package builder