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

# dh\_quilt\_unpatch(1)

unapply patches listed in debian/patches/series

## NAME

dh\_quilt\_unpatch - unapply patches listed in debian/patches/series

## SYNOPSIS

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

## DESCRIPTION

dh\_quilt\_unpatch simply calls **quilt pop -a** after having set the environment variable **QUILT\_PATCHES** to **debian/patches**. All patches listed in **debian/patches/series** are then unapplied in the current directory. The command does not fail if the patches have already been unapplied.

If the file **debian/patches/series** does not exist or is empty, dh\_quilt\_unpatch returns without doing anything.

You can use another directory instead of **debian/patches** by setting (and exporting) the environment variable **QUILT\_PATCH\_DIR**.

## EXAMPLES

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

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

It can also be direcly called in the clean rule.

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

## NOTES

This tool is useless if you use the source package format **3.0 (quilt)**. Consider switching to this source format if you haven't done it yet.

## SEE ALSO

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

This program is meant to be used together with debhelper.

## AUTHOR

Raphael Hertzog \<hertzog@debian.org\>
