apk_delete — a utility for deleting previously installed software packages
The apk_delete command is used to delete packages that have been previously installed with the apk_add command.
Since the apk_delete command may execute scripts or programs contained within a package file, your system may be susceptible to “trojan horses” or other subtle attacks from miscreants who create dangerous package files.
You are advised to verify the competence and identity of those who provide installable package files.
The following command line arguments are supported:
The named packages are deinstalled where
a package name with or without version number.
If a deinstallation script exist for a given package, do not execute it.
Force removal of the package, even if a dependency is recorded or the pre-deinstall script fails.
Show help and exit.
Don't actually deinstall a package, just report the steps that would be taken if it were.
$ROOT directory in which to
delete files from.
Quiet mode. Supress non-error messages.
Remove all those packages required by the given packages as well.
Remove all those packages depending on the given packages as well.
Turn on verbose output.
The apk_delete utility runs through the following sequence to deinstall a package:
A check is made to determine if the package is recorded as installed. If it is not, deinstallation is terminated.
If a package is required by other installed
packages, apk_delete will list those dependent packages and
refuse to delete the package (unless
-r option is given).
pre-deinstall script exists for the
package, it is executed. It is this script's responsibility
to clean up any additional messy details around the package's
installation, since all apk_delete knows how to do is delete
the files created in the original
pre-deinstall script is
sent though a pipe to sh as
... | sh
pkgname-ver is the
name (with version) of the package in question.
That is equvalent to running
with the following arguments:
fails, deinstallation terminates.
Remove itself from appropriate
Remove files and directories listed in
If the package contains a
post-deinstall file, it
is then executed as
pkgname-ver is the package
name (with version) in question.
Remove all meta files in
$APK_DBDIR/ directory that is related
to the package.
Alternative location for the installed package database.
Configuration file for the apk-tools suite.
Base directory for apk-tools. It is unset by default which
/ is the base directory.
Default location for the installed package database.
Default location of the apk-tools configuration file.