8.3.Â pkg-deinstall

This script executes when a package is removed.

This script will be run twice by pkg
delete The first time as ${SH}
pkg-deinstall ${PKGNAME} DEINSTALL before the
port is de-installed and the second time as
${SH} pkg-deinstall ${PKGNAME}
POST-DEINSTALL after the port has been de-installed.
$2 can be tested to determine which
mode the script is being run in. The PKG_PREFIX
environmental variable will be set to the package installation
directory