# man > deb-postrm(5)

[deb-postrm(5)](https://www.chedong.com/phpMan.php/man/deb-postrm/5/markdown)                                dpkg suite                                [deb-postrm(5)](https://www.chedong.com/phpMan.php/man/deb-postrm/5/markdown)



## NAME
       deb-postrm - package post-removal maintainer script

## SYNOPSIS
### DEBIAN/postrm

## 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:

       _postrm_ **remove**
           After the package was removed.

       _postrm_ **purge**
           After the package was purged.

       _old-postrm_ **upgrade** _new-version_
           After the package was upgraded.

       _new-postrm_ **failed-upgrade** _old-version_ _new-version_
           If the above **upgrade** call fails.

           The _new-version_ is passed only 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 upgrade of removed package.

           The _new-version_ is passed only since dpkg 1.18.5.

       _new-postrm_ **abort-upgrade** _old-version_ _new-version_
           If _preinst_ fails during upgrade.

           The _new-version_ is passed only since dpkg 1.18.5.

## SEE ALSO
       [**dpkg**(1)](https://www.chedong.com/phpMan.php/man/dpkg/1/markdown).



1.21.1                                       2025-09-09                                [deb-postrm(5)](https://www.chedong.com/phpMan.php/man/deb-postrm/5/markdown)
