dh_installdirs - Linux


dh_installdirs is a utility used in Debian packaging to generate directory lists for use in package control files. It helps ensure consistent installation paths and directories across different Debian-based distributions and architectures.


dh_installdirs [-a **arch**] [-c **config-file**] [-p **component**] [-r **revision**]
                 [-R **recurse**] [-v **version**] [-z **dist**]

dh_installdirs -l


  • **-a arch: Specify the target architecture.
  • **-c config-file: Specify a custom configuration file.
  • -l: List the available directory sections.
  • **-p component: Set the package component (e.g., main, contrib).
  • **-r revision: Specify the package revision.
  • **-R recurse: Recursively generate directories for all dependencies.
  • **-v version: Set the package version.
  • **-z dist: Set the distribution name (e.g., Debian, Ubuntu).


Generate installation directories for a specific architecture:

dh_installdirs -a amd64

Recursively generate directories for all dependencies:

dh_installdirs -R

Specify a custom configuration file:

dh_installdirs -c my-custom-config.cfg

Common Issues

  • Package conflicts: Ensure that the package does not conflict with existing directories or files.
  • Architecture mismatch: The specified architecture must match the target system’s architecture.
  • Invalid component: Verify that the specified component is valid for the Debian distribution being used.


Use with Debian packaging tools:


Combine with other commands:

dh_installdirs | grep bin

Related Commands

  • dh_make
  • dh_builddeb
  • dpkg-gencontrol