# phpman > man > deb-preinst(5)

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



## NAME
       deb-preinst - package pre-installation maintainer script

## SYNOPSIS
### DEBIAN/preinst

## DESCRIPTION
       A package can perform several pre-installation actions via maintainer scripts, by including
       an executable _preinst_ file in its control archive (i.e. _DEBIAN/preinst_ during package
       creation).

       The script can be called in the following ways:

       _new-preinst_ **install**
           Before the package is installed.

       _new-preinst_ **install** _old-version_ _new-version_
           Before removed package is upgraded.

           The _new-version_ is passed only since dpkg 1.18.5.

       _new-preinst_ **upgrade** _old-version_ _new-version_
           Before the package is upgraded.

           The _new-version_ is passed only since dpkg 1.18.5.

       _old-preinst_ **abort-upgrade** _new-version_
           If _postrm_ fails during upgrade or fails on failed upgrade.

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



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