deb-postinst(5) dpkg suite deb-postinst(5)

# [NAME](#NAME)

deb-postinst - package post-installation maintainer script

# [SYNOPSIS](#SYNOPSIS)

**DEBIAN/postinst**

# [DESCRIPTION](#DESCRIPTION)

A package can perform several post-installation actions via maintainer scripts, by including an executable *postinst* file in its control archive (i.e. *DEBIAN/postinst* during package creation).

The script can be called in the following ways:

[*postinst* **configure** *old-version*](#postinst)

After the package was installed.

[*postinst* **triggered** "*trigger-name...*"](#postinst~2)

After the package was triggered. The list of space-separated *trigger-name*s is passed as the second argument.

[*old-postinst* **abort-upgrade** *new-version*](#old)

If *prerm* fails during **upgrade** or fails on **failed-upgrade**.

[*old-postinst* **abort-remove**](#old~2)

If *prerm* fails during **remove**.

[*postinst* **abort-deconfigure** **in-favour** *new-package* *new-version*](#postinst~3)

       \[ **removing** *old-package* *old-version* ]

If *prerm* fails during **deconfigure in-favour** of a package.

[*postinst* **abort-remove** **in-favour** *new-package* *new-version*](#postinst~4)

If *prerm* fails during **remove in-favour** for replacement due to conflict.

# [SEE ALSO](#SEE_ALSO)

[**dpkg**(1)](/man/os/dpkg/dpkg.1).

2026-09-09 1.23.11-dirty

---

Document: deb-postinst(5) from dpkg 1.23.11-r3 (Chainguard OS)
Source: https://git.dpkg.org/git/dpkg/dpkg.git
