deb-postrm - package post-removal maintainer script
Contents
Description
A package can perform several post-removal actions via maintainer scripts, by including an executable
postrm file in its control archive (i.e. DEBIAN/postrm during package creation).
The script can be called in the following ways:
postrmremove
After the package was removed.
postrmpurge
After the package was purged.
old-postrmupgradenew-version
After the package was upgraded.
new-postrmfailed-upgradeold-versionnew-version
If the above upgrade call fails.
The new-version is passed only since dpkg 1.18.5.
postrmdisappearoverwriter-packageoverwriter-version
After all of the packages files have been replaced.
new-postrmabort-install
If preinst fails during install.
new-postrmabort-installold-versionnew-version
If preinst fails during install for an upgrade of a removed package.
The new-version is passed only since dpkg 1.18.5.
new-postrmabort-upgradeold-versionnew-version
If preinst fails during upgrade.
The new-version is passed only since dpkg 1.18.5.
Name
deb-postrm - package post-removal maintainer script
See Also
dpkg(1).
1.22.21 2025-07-14 deb-postrm(5)
Synopsis
DEBIAN/postrm
