PKG_DELETE(1) OpenBSD Reference Manual PKG_DELETE(1)NAMEpkg_delete - delete software package distributions
SYNOPSISpkg_delete [-cIimnqsvx] [-B pkg-destdir] [-D name [=value]]
pkg-name [...]
DESCRIPTION
The pkg_delete command is used to delete packages that have been
previously 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 wildcards can
be used.
Version numbers and flavors (see packages-specs(7)) can be omitted,
unless the resulting specification is ambiguous.
The options are as follows:
-B pkg-destdir Set pkg-destdir as the prefix to prepend to any object
deleted.
-c Delete extra configuration file, mentioned as
@extra file
in the packing-list.
-D name[=value]
Force removal of the package. name is a keyword that
states what failsafe should be waived. Recognized
keywords include:
ambiguous delete all packages matching ambiguous
package specifications.
baddepend force the deletion of packages even if
they reference inexistent dependencies.
dependencies also delete the whole set of packages
that depends upon the requested packages.
nonroot uninstall even if not running as root.
scripts external scripts may fail.
uninstalled proceed even if some package names don't
resolve to installed package names.
verbosedeps show detailed dependency information.
-I If scripts exist for a given package, do not execute
them.
-i Switch on interactive mode. pkg_delete may ask questions
to the user if faced with difficult decisions.
-m Causes pkg_delete to always display the progress meter in
cases it would not do so by default.
-n Don't actually deinstall a package, just report the steps
that would be taken if it were.
-q Delete package quickly, do not bother with checksums
before removing normal files. For signed packages, do
not bother verifying signatures either. If used twice,
it will not bother with checksums for configuration files
either.
-s Don't actually deinstall packages, report the disk size
changes that would happen.
-v Turn on verbose output. Several -v turn on more verbose
output. By default, pkg_delete is almost completely
silent, but it reacts to keyboard status requests (see
stty(1)). -v turns on basic messages, -vv adds relevant
system operations, -vvv shows most internal computations
apart from individual file/directory additions, and
-vvvvv shows everything.
-x Disable progress meter.
TECHNICAL DETAILSpkg_delete examines installed package records for the pkgname specified,
checks inter-dependencies between installed packages, deletes the package
contents in an order respecting dependencies (e.g., packages with
dependencies get removed first), and finally removes the package records.
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 a deinstall script exists for the package (deprecated, @unexec is more
versatile), it is executed before any files are removed. Such a script
can be used to remove messy dynamic 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 deletion.
ENVIRONMENT
PKG_DBDIR Where to look for installed packages instead of /var/db/pkg.
PKG_DESTDIR Value for pkg-destdir, if no -B option is specified; value
passed to any DEINSTALL or REQUIRE script invoked from the
package.
SEE ALSOpkg_add(1), pkg_create(1), pkg_info(1), packages-specs(7)AUTHORS
Jordan Hubbard
initial design
Marc Espie
complete rewrite
OpenBSD 4.9 June 5, 2010 OpenBSD 4.9