---
name: "dh_dpatch_unpatch"
section: "1"
platform: "linux"
package: "dpatch"
version: "2.0.41"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/dh_dpatch_unpatch"
---

# dh\_dpatch\_unpatch(1)

unapply patches listed in debian/patched

## NAME

dh\_dpatch\_unpatch - unapply patches listed in debian/patched

## SYNOPSIS

**dh\_dpatch\_unpatch** \[*debhelper options*\]

## DESCRIPTION

dh\_dpatch\_unpatch simply calls **dpatch deapply-all**. All patches listed in **debian/patched** are then unapplied in the current directory. The command does not fail if the patches have already been unapplied.

## EXAMPLES

dh\_dpatch\_unpatch is usually called indirectly in a rules file via the dh command.

```
        %:
                dh --with dpatch $@
```

It can also be direcly called in the clean rule.

```
        clean:
                dh_testdir
                dh_testroot
                [ ! -f Makefile ] || $(MAKE) clean
                dh_dpatch_unpatch
                dh_clean
```

## SEE ALSO

[**debhelper**(7)](/debhelper/7.md), [**dh**(1)](/dh/1.md).

This program is meant to be used together with debhelper.

## AUTHOR

Hideki Yamane \<henrich@debian.or.jp\>, stolen from dh\_quilt\_unpatch written by Raphael Hertzog \<hertzog@debian.org\>
