wpkg --remove-hooks

Options Comments
--admindir Define the administration directory, where the database of the installed packages resides.
--quiet Request for warning messages to not be displayed.
--root Define the installation root path.
--verbose Display log information of level INFO.

It is possible for other projects to hook themselves in the wpkg environment by adding hooks. In most cases this is done automatically by project maintainers by adding hook scripts along their control file. However, hooks that are added manually, also called Global hooks, have to be removed manually. This is done with the --add-hooks and --remove-hooks commands. To see the list of existing hooks, use the --list-hooks command.

The name of a hook specific to a package is defined as:


To distinguish package hooks from manually installed hooks, a special package name is used: core. When installing a hook with the --add-hooks command, the name you are expected to use is:

<unique name>_<function>[.sh|.bat]

wpkg automatically prepends the "core_" prefix to your global hook name and copies the script to the core/hooks sub-directory of the database:

core_<unique name>_<function>[.sh|bat]

The names expected on the --remove-hooks command are the <unique name>_<function> names, optionally with the extension. If a hook to be removed is not installed, wpkg generates a warning. For example, a project named foo could install the basic 4 scripts and when being removed, run the following command to remove itself from the wpkg environment:

wpkg --root path/to/root --remove-hooks foo_preinst foo_postinst foo_prerm foo_postrm

Note that to remove package specific hooks you have to --remove or --purge the corresponding package (--unpack also has the same effect of removing the package specific hooks.) The --remove-hooks cannot help you with those.