OS Manuals

deb-prerm(5)

deb-prerm - package pre-removal maintainer script

deb-prerm(5) dpkg suite deb-prerm(5)

deb-prerm - package pre-removal maintainer script

DEBIAN/prerm

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

The script can be called in the following ways:

Before the package is removed.
Before an upgrade.
If the above upgrade fails.

Support for new-version since dpkg 1.18.5.

    [ removing old-package old-version ]
Before package is deconfigured while dependency is replaced due to conflict.
Before the package is replaced due to conflict.

dpkg(1).

2026-09-09 1.23.11-dirty

dpkg 1.23.11-r3 · os · ingested 2026-10-27