pkg_delete - a utility for deleting previously installed
pkg_delete [-cDnqv] [-B pkg-destdir] [-f keys] pkgname [...]
The pkg_delete command is used to delete packages that have
installed with the pkg_add(1) command.
Package names may be specified either as the package name
itself, or as a
filename which consists of the package name plus the
``.tgz'' suffix, or
as a full pathname like /var/db/pkg/pkgname, so that shell
Version numbers and flavors (see packages-specs(7)) can be
the resulting specification is ambiguous.
The options are as follows:
-B pkg-destdir Set pkg-destdir as the prefix to prepend to
-v Turn on verbose output.
-D If a deinstallation script exists for a given package, do
not execute it.
-n Don't actually deinstall a package, just report the steps
that would be taken if it were.
-f keys Force removal of the package. keys is a
list of keywords that state what failsafes
waived. These include:
delete all packages matching ambiguous package
also delete the whole set of packages that depends
upon the requested packages.
nonroot uninstall even if not running as
proceed even if some package names
to installed package names.
-c Delete extra configuration file, mentioned
in the packing-list.
-q Delete package quickly, do not bother checking md5s before
pkg_delete examines installed package records for the
checks inter-dependencies between installed packages,
deletes the package
contents in an order respecting dependencies (e.g., packages
get removed first), and finally removes the package
If a package is required by other installed packages not
mentioned in the
list of packages to remove, pkg_delete will list those dependent packages
and refuse to delete the package.
If the package contains a require file (see pkg_create(1)),
then this is
executed first as
require <pkg-name> DEINSTALL
(where pkgname is the name of the package in question and
DEINSTALL is a
keyword denoting that this is a deinstallation) to see
whether or not deinstallation
should continue. A non-zero exit status means
the -f option is specified.
If a deinstall script exists for the package, it is executed
files are removed. Such a script can be used to remove
files created by the package on installation or during usage. The
deinstall script is called as:
deinstall <pkg-name> DEINSTALL
Passing the keyword DEINSTALL lets you potentially write only one program/script
that handles all aspects of installation and
PKG_DBDIR Where to look for installed packages instead of
PKG_DESTDIR Value for pkg-destdir, if no -B option is specified; value
passed to any DEINSTALL or REQUIRE script invoked from the
pkg_add(1), pkg_create(1), pkg_info(1), mkstemp(3), mtree(8)
OpenBSD 3.6 November 25, 1994
[ Back ]