deb-src-rules - Linux


deb-src-rules is a command-line tool used to get information about and manipulate package source rules in a debian/ directory. It provides various options for managing, filtering, and modifying source rules, making it a useful utility for package maintainers and users.


deb-src-rules [options] [<subcommand>] [<arguments>]


  • -h, –help: Display usage information and exit
  • -V, –version: Show version information and exit
  • -d, –debug: Enable debug output
  • -q, –quiet: Suppress warnings and messages
  • -f, –force: Overwrite existing files without prompting
  • -p, –package : Specify the package to operate on



  • Lists source rules for the specified package


  • Filters source rules based on a given criteria


  • Removes source rules that match a given criteria


  • Modifies source rules that match a given criteria


List source rules for the ‘dpkg’ package:

deb-src-rules list dpkg

Filter source rules by a specific field:

deb-src-rules filter dpkg 'Source: ^deb'

Remove source rules with a given Source field:

deb-src-rules remove dpkg 'Source: ^deb'

Modify source rules to add a new field:

deb-src-rules modify dpkg 'foo: bar'

Common Issues

Error: File already exists

This error occurs when you try to create a new source rule that already exists. Use the -f, –force option to overwrite the existing rule.


deb-src-rules can be integrated with other tools for advanced tasks, such as:

  • dh-make: For automating the creation of Debian packages
  • lintian: For checking Debian packages for common errors and warnings

Related Commands

  • apt-src: Manipulates source package information
  • dpkg-source: Builds Debian source packages
  • lintian: Checks Debian packages for common errors and warnings