---
name: "dh_prep"
section: "1"
platform: "linux"
package: "debhelper"
version: "13.24.2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dh_prep"
---

# dh\_prep(1)

perform cleanups in preparation for building a binary package

## NAME

dh\_prep - perform cleanups in preparation for building a binary package

## SYNOPSIS

**dh\_prep** \[*debhelper options*\] \[**-X***item*\]

## DESCRIPTION

**dh\_prep** is a debhelper program that performs some file cleanups in preparation for building a binary package. (This is what **dh\_clean -k** used to do.) It removes the package build directories, *debian/tmp*, and some temp files that are generated when building a binary package.

It is typically run at the top of the **binary-arch** and **binary-indep** targets, or at the top of a target such as install that they depend on.

## OPTIONS

- **-X***item* **--exclude=***item*

  Exclude files that contain *item* anywhere in their filename from being deleted, even if they would normally be deleted. You may use this option multiple times to build up a list of things to exclude.

## SEE ALSO

[**debhelper**(7)](/debhelper/7.md)

This program is a part of debhelper.

## AUTHOR

Joey Hess \<joeyh@debian.org\>
