# 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 a 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.22.6                                       2026-05-06                               [_deb-preinst_(5)](https://www.chedong.com/phpMan.php/man/deb-preinst/5/markdown)
