2018-07-10 03:20:51 -07:00
|
|
|
.\" $OpenBSD: pkg_delete.1,v 1.59 2018/07/10 10:20:51 espie Exp $
|
2003-10-19 11:38:06 -07:00
|
|
|
.\"
|
2007-04-15 03:17:29 -07:00
|
|
|
.\" Documentation and design originally from FreeBSD. All the code has
|
|
|
|
.\" been rewritten since. We keep the documentation's notice:
|
2003-10-19 11:38:06 -07:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" Jordan K. Hubbard
|
|
|
|
.\"
|
|
|
|
.\"
|
2018-07-10 03:20:51 -07:00
|
|
|
.Dd $Mdocdate: July 10 2018 $
|
2003-10-19 11:38:06 -07:00
|
|
|
.Dt PKG_DELETE 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm pkg_delete
|
2007-10-31 07:45:06 -07:00
|
|
|
.Nd delete software package distributions
|
2003-10-19 11:38:06 -07:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm pkg_delete
|
2017-03-11 03:42:10 -08:00
|
|
|
.Op Fl acIimnqsVvXx
|
2004-02-25 13:56:12 -08:00
|
|
|
.Op Fl B Ar pkg-destdir
|
2017-03-11 10:24:55 -08:00
|
|
|
.Op Fl D Ar name Ns Op = Ns Ar value
|
2015-10-07 10:52:38 -07:00
|
|
|
.Op Ar pkg-name ...
|
2003-10-19 11:38:06 -07:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command is used to delete packages that have been previously installed
|
|
|
|
with the
|
|
|
|
.Xr pkg_add 1
|
|
|
|
command.
|
|
|
|
.Pp
|
2004-01-27 05:09:16 -08:00
|
|
|
Package names may be specified either as the package name itself, or as a
|
|
|
|
filename which consists of the package name plus the
|
2003-10-19 11:38:06 -07:00
|
|
|
.Dq .tgz
|
2004-01-27 05:09:16 -08:00
|
|
|
suffix, or as a full pathname like
|
|
|
|
.Pa /var/db/pkg/pkgname ,
|
|
|
|
so that shell wildcards can be used.
|
|
|
|
.Pp
|
|
|
|
Version numbers and flavors
|
|
|
|
.Po
|
|
|
|
see
|
|
|
|
.Xr packages-specs 7
|
|
|
|
.Pc
|
|
|
|
can be omitted, unless the resulting specification is ambiguous.
|
2003-10-19 11:38:06 -07:00
|
|
|
.Pp
|
2016-06-14 10:09:25 -07:00
|
|
|
Otherwise,
|
|
|
|
.Ar pkg-name
|
|
|
|
in
|
|
|
|
.Nm
|
|
|
|
may use the same convenient shortcuts as
|
|
|
|
.Xr pkg_add 1 :
|
|
|
|
.Sq Nm Ar autoconf Ns % Ns Ar 2.13
|
|
|
|
will delete
|
|
|
|
.Ar autoconf
|
|
|
|
from the
|
|
|
|
.Ar 2.13
|
|
|
|
branch.
|
|
|
|
.Pp
|
2011-08-17 03:48:27 -07:00
|
|
|
.Nm
|
|
|
|
will
|
|
|
|
.Xr syslog 3
|
2017-02-27 13:53:11 -08:00
|
|
|
deletions by default.
|
2011-08-17 03:48:27 -07:00
|
|
|
.Pp
|
2012-07-06 05:11:51 -07:00
|
|
|
.Nm
|
2013-04-30 11:33:30 -07:00
|
|
|
relies on the file system information being consistent.
|
|
|
|
In case of a system crash,
|
|
|
|
.Pa /var/db/pkg
|
|
|
|
may become corrupted.
|
|
|
|
Use
|
|
|
|
.Xr pkg_check 8
|
|
|
|
to repair things.
|
|
|
|
.Pp
|
|
|
|
.Nm
|
2012-07-06 05:11:51 -07:00
|
|
|
may ask questions in interactive mode, or error out otherwise.
|
|
|
|
Interactive mode is the default on a tty, see
|
|
|
|
options
|
|
|
|
.Fl I/i .
|
|
|
|
.Pp
|
2003-10-19 11:38:06 -07:00
|
|
|
The options are as follows:
|
2017-03-11 10:24:55 -08:00
|
|
|
.Bl -tag -width Ds
|
2011-07-12 03:34:09 -07:00
|
|
|
.It Fl a
|
|
|
|
Delete unused dependencies (packages that are not needed by anything tagged
|
|
|
|
as installed manually).
|
2011-07-18 12:19:08 -07:00
|
|
|
Can be used without
|
|
|
|
.Ar pkgnames .
|
2011-11-25 01:30:08 -08:00
|
|
|
If used with
|
|
|
|
.Ar pkgnames ,
|
|
|
|
it will only delete non manual installs in the list.
|
2004-02-25 13:56:12 -08:00
|
|
|
.It Fl B Ar pkg-destdir
|
|
|
|
Set
|
|
|
|
.Ar pkg-destdir
|
|
|
|
as the prefix to prepend to any object deleted.
|
2004-11-15 02:49:19 -08:00
|
|
|
.It Fl c
|
|
|
|
Delete extra configuration file, mentioned as
|
|
|
|
.Dl @extra file
|
|
|
|
in the packing-list.
|
2017-03-11 10:24:55 -08:00
|
|
|
.It Fl D Ar name Ns Op = Ns Ar value
|
2004-01-27 05:09:16 -08:00
|
|
|
Force removal of the package.
|
2010-01-10 13:27:59 -08:00
|
|
|
.Ar name
|
|
|
|
is a keyword that states what failsafe
|
2004-01-27 05:09:16 -08:00
|
|
|
should be waived.
|
2010-01-10 13:27:59 -08:00
|
|
|
Recognized keywords include:
|
2017-02-15 05:19:08 -08:00
|
|
|
.Pp
|
|
|
|
.Bl -tag -width "dependenciesXX" -compact
|
2018-01-07 21:42:48 -08:00
|
|
|
.It Cm baddepend
|
2017-02-15 05:19:08 -08:00
|
|
|
Force the deletion of packages even if they reference nonexistent dependencies.
|
2018-01-07 21:42:48 -08:00
|
|
|
.It Cm checksum
|
2017-03-25 12:53:33 -07:00
|
|
|
Verify checksums before deleting files.
|
2018-01-07 21:42:48 -08:00
|
|
|
.It Cm dependencies
|
2017-02-15 05:19:08 -08:00
|
|
|
Also delete the whole set of packages that depends upon the requested packages.
|
2018-01-07 21:42:48 -08:00
|
|
|
.It Cm nonroot
|
2017-02-15 05:19:08 -08:00
|
|
|
Uninstall even if not running as root.
|
2018-01-07 21:42:48 -08:00
|
|
|
.It Cm scripts
|
2017-02-15 05:19:08 -08:00
|
|
|
External scripts may fail.
|
2004-01-27 06:50:52 -08:00
|
|
|
.El
|
2012-07-06 05:02:50 -07:00
|
|
|
.It Fl I
|
|
|
|
Force non-interactive mode.
|
|
|
|
Default is to be interactive when run from a tty.
|
* New -i interactive option, that can ask obnoxious questions.
* move the signature code to a packing-list method, prepend the pkgname.
* depend on distant listings, cache these systematically.
* cut the PKG_PATH at :/ systematically, much simpler than parsing URLs.
People should get used to trailing /s.
* let pkg_add -u actually run the update.
* check for signature in more places, for instance, let pkg_add installed_stuff
be a void operation.
* grab enough stuff during updates to check signatures, so that pkg_add -u
can report updates that are not needed right away, instead of waiting
for the more confusing `trying to update'
* beginning of @module support.
* @pkgpath support, including updates.
* systematically expand stems when applicable.
* use visitors systematically in pkg_info.
* pkg_info -S reports signature.
* remove hardcoding of categories in PackingList, so that future modules
will be able to expand them.
* add @updateset and @incompatibility keywords.
2005-09-04 15:47:56 -07:00
|
|
|
.It Fl i
|
2012-07-06 05:02:50 -07:00
|
|
|
Force interactive mode, even if not run from a tty.
|
* New -i interactive option, that can ask obnoxious questions.
* move the signature code to a packing-list method, prepend the pkgname.
* depend on distant listings, cache these systematically.
* cut the PKG_PATH at :/ systematically, much simpler than parsing URLs.
People should get used to trailing /s.
* let pkg_add -u actually run the update.
* check for signature in more places, for instance, let pkg_add installed_stuff
be a void operation.
* grab enough stuff during updates to check signatures, so that pkg_add -u
can report updates that are not needed right away, instead of waiting
for the more confusing `trying to update'
* beginning of @module support.
* @pkgpath support, including updates.
* systematically expand stems when applicable.
* use visitors systematically in pkg_info.
* pkg_info -S reports signature.
* remove hardcoding of categories in PackingList, so that future modules
will be able to expand them.
* add @updateset and @incompatibility keywords.
2005-09-04 15:47:56 -07:00
|
|
|
.Nm
|
|
|
|
may ask questions to the user if faced with difficult decisions.
|
2010-06-05 00:11:43 -07:00
|
|
|
.It Fl m
|
|
|
|
Causes
|
|
|
|
.Nm
|
|
|
|
to always display the progress meter in cases it would not do so by default.
|
2004-11-15 02:49:19 -08:00
|
|
|
.It Fl n
|
|
|
|
Don't actually deinstall a package, just report the steps that
|
|
|
|
would be taken if it were.
|
2017-03-25 12:53:33 -07:00
|
|
|
.It Fl qq
|
|
|
|
Do not bother with checksums for configuration files.
|
2009-12-21 03:03:00 -08:00
|
|
|
.It Fl s
|
|
|
|
Don't actually deinstall packages, report the disk size changes
|
|
|
|
that would happen.
|
2017-03-11 03:42:10 -08:00
|
|
|
.It Fl V
|
|
|
|
Turn on statistics output.
|
|
|
|
For now, only displays the number of packages done/total number of packages.
|
|
|
|
Several
|
|
|
|
.Fl V
|
|
|
|
will turn on more statistics in the future.
|
2004-11-14 03:58:43 -08:00
|
|
|
.It Fl v
|
|
|
|
Turn on verbose output.
|
|
|
|
Several
|
|
|
|
.Fl v
|
|
|
|
turn on more verbose output.
|
2009-12-21 03:03:00 -08:00
|
|
|
By default,
|
|
|
|
.Nm
|
|
|
|
is almost completely silent, but it reacts to keyboard status requests
|
|
|
|
.Po
|
|
|
|
see
|
|
|
|
.Xr stty 1
|
|
|
|
.Pc .
|
|
|
|
.Fl v
|
|
|
|
turns on basic messages,
|
|
|
|
.Fl vv
|
|
|
|
adds relevant system operations,
|
|
|
|
.Fl vvv
|
|
|
|
shows most internal computations apart from individual file/directory
|
|
|
|
additions, and
|
|
|
|
.Fl vvvvv
|
|
|
|
shows everything.
|
2011-12-02 04:00:32 -08:00
|
|
|
.It Fl X
|
|
|
|
Delete everything, except the list of packages that follow.
|
2004-11-14 03:58:43 -08:00
|
|
|
.It Fl x
|
2010-02-28 07:35:41 -08:00
|
|
|
Disable progress meter.
|
2003-10-19 11:38:06 -07:00
|
|
|
.El
|
|
|
|
.Sh TECHNICAL DETAILS
|
|
|
|
.Nm
|
2004-01-27 05:09:16 -08:00
|
|
|
examines installed package records for the
|
|
|
|
.Ar 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.
|
2003-10-19 11:38:06 -07:00
|
|
|
.Pp
|
2004-01-27 05:09:16 -08:00
|
|
|
If a package is required by other installed packages not mentioned in
|
|
|
|
the list of packages to remove,
|
2003-10-19 11:38:06 -07:00
|
|
|
.Nm
|
2004-01-27 05:09:16 -08:00
|
|
|
will list those dependent packages and refuse to delete the package.
|
2004-02-25 13:56:12 -08:00
|
|
|
.Sh ENVIRONMENT
|
2017-03-25 12:53:33 -07:00
|
|
|
.Bl -tag -width PKG_CHECKSUM
|
|
|
|
.It Ev PKG_CHECKSUM
|
|
|
|
If set, verify files checksums during deletion, exactly like
|
2018-01-07 21:42:48 -08:00
|
|
|
.Fl D Ns Cm checksum .
|
2004-02-25 13:56:12 -08:00
|
|
|
.It Ev PKG_DBDIR
|
|
|
|
Where to look for installed packages instead of
|
|
|
|
.Pa /var/db/pkg .
|
|
|
|
.El
|
2003-10-19 11:38:06 -07:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr pkg_add 1 ,
|
|
|
|
.Xr pkg_create 1 ,
|
|
|
|
.Xr pkg_info 1 ,
|
2013-04-30 11:33:30 -07:00
|
|
|
.Xr packages-specs 7 ,
|
|
|
|
.Xr pkg_check 8
|
2003-10-19 11:38:06 -07:00
|
|
|
.Sh AUTHORS
|
|
|
|
.Bl -tag -width indent -compact
|
2014-09-07 18:27:54 -07:00
|
|
|
.It An Jordan Hubbard
|
2003-10-19 11:38:06 -07:00
|
|
|
initial design
|
2014-09-07 18:27:54 -07:00
|
|
|
.It An Marc Espie
|
2003-10-19 11:38:06 -07:00
|
|
|
complete rewrite
|
|
|
|
.El
|