deb-postrm(5)

πŸ’… deb-postrm(5) β€” package post-removal maintainer script πŸ’…

Ok so bestie, this is the manual page for deb-postrm(5): the whole vibe of what a package's post-removal maintainer script can do. It’s giving β€œcleanup era” and honestly? Iconic.

πŸŽ€ NAME πŸŽ€

deb-postrm β€” package post-removal maintainer script

✨ SYNOPSIS ✨

DEBIAN/postrm

πŸ¦‹ DESCRIPTION πŸ¦‹

A package can perform several post-removal actions via maintainer scripts, bestie. The way it does that is by including an executable postrm file in its control archive (i.e. DEBIAN/postrm during package creation). No cap, that’s the whole setup.

The script can be called in the following ways:

  • postrm remove β€” after the package was removed. Cleanup arc activated. ✨
  • postrm purge β€” after the package was purged. Full delete energy. πŸ’…
  • old-postrm upgrade new-version β€” after the package was upgraded.
  • new-postrm failed-upgrade old-version new-version β€” if the above upgrade call fails. Also, support for new-version since dpkg 1.18.5.
  • postrm disappear overwriter-package overwriter-version β€” after all of the packages files have been replaced.
  • new-postrm abort-install β€” if preinst fails during install.
  • new-postrm abort-install old-version new-version β€” if preinst fails during install for an upgrade of a removed package. Also, support for new-version since dpkg 1.18.5.
  • new-postrm abort-upgrade old-version new-version β€” if preinst fails during upgrade. Also, support for new-version since dpkg 1.18.5.

🌈 SEE ALSO 🌈

  • dpkg(1) β€” go read that too, bestie.

🫢 cute sign-off: this page is from the dpkg suite, version 1.23.11-dirty, dated 2026-09-09. That’s the tea. πŸ’–
πŸ“¦ where this page comes from