head	1.5;
access;
symbols
	pkg_install-20040207:1.1.1.3
	pkg_install-20031018:1.1.1.2
	pkg_install-20030923:1.1.1.2
	pkg_install-20030914:1.1.1.1
	TNF:1.1.1;
locks; strict;
comment	@# @;


1.5
date	2004.03.12.13.05.22;	author grant;	state dead;
branches;
next	1.4;

1.4
date	2004.02.07.11.52.50;	author grant;	state Exp;
branches;
next	1.3;

1.3
date	2003.09.23.14.04.34;	author grant;	state Exp;
branches;
next	1.2;

1.2
date	2003.09.15.04.54.28;	author grant;	state Exp;
branches;
next	1.1;

1.1
date	2002.11.25.12.28.14;	author grant;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2003.09.15.04.49.20;	author grant;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2003.09.23.13.33.06;	author grant;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2004.02.07.11.47.05;	author grant;	state Exp;
branches;
next	;


desc
@@


1.5
log
@remove; bootstrap-pkgsrc has been moved to pkgsrc/bootstrap/ now.
@
text
@PKG_DELETE(1)           NetBSD General Commands Manual           PKG_DELETE(1)

NNAAMMEE
     ppkkgg__ddeelleettee - a utility for deleting previously installed software package
     distributions

SSYYNNOOPPSSIISS
     ppkkgg__ddeelleettee [--DDddFFffnnOORRrrVVvv] [--KK _p_k_g___d_b_d_i_r] [--pp _p_r_e_f_i_x] _p_k_g_-_n_a_m_e _._._.

DDEESSCCRRIIPPTTIIOONN
     The ppkkgg__ddeelleettee command is used to delete packages that have been previ-
     ously installed with the pkg_add(1) command.

WWAARRNNIINNGG
     _S_i_n_c_e _t_h_e ppkkgg__ddeelleettee _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _p_r_o_v_i_d_e_d _b_y
     _a _p_a_c_k_a_g_e _f_i_l_e_, _y_o_u_r _s_y_s_t_e_m _m_a_y _b_e _s_u_s_c_e_p_t_i_b_l_e _t_o _`_`_T_r_o_j_a_n _h_o_r_s_e_s_'_' _o_r
     _o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s _p_a_c_k_a_g_e _f_i_l_e_s_.

     _Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_-
     _v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_.  _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _e_x_a_m_i_n_e _a_l_l _t_h_e
     _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s _i_n _t_h_e _p_a_c_k_a_g_e _r_e_c_o_r_d _d_i_r_e_c_t_o_r_y
     _(_/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>_/_)_.  _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L_,
     _+_D_E_I_N_S_T_A_L_L_, _+_R_E_Q_U_I_R_E _o_r _+_M_T_R_E_E___D_I_R_S _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e
     _f_o_r @@@@ccwwdd_, @@@@mmooddee _(_c_h_e_c_k _f_o_r _s_e_t_u_i_d_)_, @@@@ddiirrrrmm_, @@@@eexxeecc_, _a_n_d @@@@uunneexxeecc _d_i_r_e_c_-
     _t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _i_n_s_t_a_l_l_e_d _p_a_c_k_-
     _a_g_e _c_o_n_t_r_o_l _f_i_l_e_s_.

OOPPTTIIOONNSS
     The following command line options are supported:

     _p_k_g_-_n_a_m_e _._._.
             The named packages are deinstalled, wildcards can be used, see
             pkg_info(1).  If no version is given, the one currently installed
             will be removed.  If the --FF flag is given, one or more (absolute)
             filenames may be specified and the Package Database will be con-
             sulted for the package to which the given file belongs.  These
             packages are then deinstalled.

     --DD      If a deinstallation script exists for a given package, do not
             execute it.

     --dd      Remove empty directories created by file cleanup.  By default,
             only files/directories explicitly listed in a package's contents
             (either as normal files/directories or with the @@@@ddiirrrrmm directive)
             will be removed at deinstallation time.  This option tells
             ppkkgg__ddeelleettee to also remove any directories that were emptied as a
             result of removing the package.

     --FF      Any pkg-name given will be interpreted as pathname which is sub-
             sequently transformed in a (real) package name via the Package
             Database.  That way, packages can be deleted by giving a filename
             instead of the package-name.

     --ff      Force removal of the package, even if a dependency is recorded or
             the deinstall or require script fails.

     --KK _p_k_g___d_b_d_i_r
             Set _p_k_g___d_b_d_i_r as the package database directory.  If this option
             isn't specified, then the package database directory is taken
             from the value of the environment variable PKG_DBDIR if it's set,
             otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.

     --nn      Don't actually deinstall a package, just report the steps that
             would be taken if it were.

     --OO      Only delete the package's entries from the package database, do
             not touch the package or its files itself.

     --pp _p_r_e_f_i_x
             Set _p_r_e_f_i_x as the directory in which to delete files from any
             installed packages which do not explicitly set theirs.  For most
             packages, the prefix will be set automatically to the installed
             location by pkg_add(1).

     --RR      This option triggers a recursive delete of the given package and
             any packages it depends on, unless some other package still needs
             a dependent package.  This --RR option can be used to clean up by
             deleting a package and all its then-unneeded dependent packages.

     --rr      ppkkgg__ddeelleettee first builds a list of all packages that require
             (directly and indirectly) the one being deleted.  It then deletes
             these packages using ppkkgg__ddeelleettee with the given options before
             deleting the user specified package.  This --rr option can be used
             to recursively delete a package and all of the packages which
             depend on that package.

     --VV      Print version number and exit.

     --vv      Turn on verbose output.

TTEECCHHNNIICCAALL DDEETTAAIILLSS
     ppkkgg__ddeelleettee does pretty much what it says.  It examines installed package
     records in _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>, deletes the package contents, and
     finally removes the package records (if an alternate package database
     directory is specified, then it overrides the _/_v_a_r_/_d_b_/_p_k_g path shown
     above).

     If a package is required by other installed packages, ppkkgg__ddeelleettee will
     list those dependent packages and refuse to delete the package (unless
     the --ff option is given).

     If a package has been marked as a pprreesseerrvveedd package, it will not be able
     to be deleted (unless more than one occurrence of the --ff option is
     given).

     If a filename is given instead of a package name, the package of which
     the given file belongs to can be deleted if the --FF Flag is given.  The
     filename needs to be absolute, see the output produced by the pkg_info
     --aaFF command.

     If the package contains a _r_e_q_u_i_r_e file (see pkg_create(1)), then this is
     executed first as
           rreeqquuiirree _<_p_k_g_-_n_a_m_e_> _D_E_I_N_S_T_A_L_L
     (where _p_k_g_-_n_a_m_e is the name of the package in question and _D_E_I_N_S_T_A_L_L is a
     keyword denoting that this is a deinstallation) to see whether or not
     deinstallation should continue.  A non-zero exit status means no, unless
     the --ff option is specified.

     If a ddeeiinnssttaallll script exists for the package, it is executed before and
     after any files are removed.  It is this script's responsibility to clean
     up any additional messy details around the package's installation, since
     all ppkkgg__ddeelleettee knows how to do is delete the files created in the origi-
     nal distribution.  The ddeeiinnssttaallll script is called as:
           ddeeiinnssttaallll _<_p_k_g_-_n_a_m_e_> _V_I_E_W_-_D_E_I_N_S_T_A_L_L
     before removing the package from a view, and as:
           ddeeiinnssttaallll _<_p_k_g_-_n_a_m_e_> _D_E_I_N_S_T_A_L_L
     before deleting all files and as:
           ddeeiinnssttaallll _<_p_k_g_-_n_a_m_e_> _P_O_S_T_-_D_E_I_N_S_T_A_L_L
     after deleting them.  Passing the keywords _V_I_E_W_-_D_E_I_N_S_T_A_L_L, _D_E_I_N_S_T_A_L_L and
     _P_O_S_T_-_D_E_I_N_S_T_A_L_L lets you potentially write only one program/script that
     handles all aspects of installation and deletion.

     All scripts are called with the environment variable PKG_PREFIX set to
     the installation prefix (see the --pp option above).  This allows a package
     author to write a script that reliably performs some action on the direc-
     tory where the package is installed, even if the user might have changed
     it by specifying the --pp option when running ppkkgg__ddeelleettee or pkg_add(1).

SSEEEE AALLSSOO
     pkg_add(1), pkg_admin(1), pkg_create(1), pkg_info(1), mktemp(3),
     packages(7), mtree(8)

AAUUTTHHOORRSS
     Jordan Hubbard
             most of the work
     John Kohl
             refined it for NetBSD
     Hubert Feyrer
             NetBSD wildcard dependency processing, pkgdb, recursive "down"
             delete, etc.

NetBSD 1.6                     September 2, 2003                    NetBSD 1.6
@


1.4
log
@merge pkg_install-20040207.
@
text
@@


1.3
log
@merge pkg_install-20030923.
@
text
@d39 2
a40 2
     --DD      If a deinstallation script exists for a given package, do not ex-
             ecute it.
d70 2
a71 2
             Set _p_r_e_f_i_x as the directory in which to delete files from any in-
             stalled packages which do not explicitly set theirs.  For most
d75 4
a78 4
     --RR      Like the --rr option, this does a recursive delete.  The --RR option
             deletes the given package and any packages required by it, unless
             some other package still needs them.  This can be used to delete
             a package and all the packages it needs.
d80 2
a81 2
     --rr      ppkkgg__ddeelleettee first builds a list of all packages that require (di-
             rectly and indirectly) the one being deleted.  It then deletes
d83 3
a85 1
             deleting the user specified package.
d93 3
a95 3
     records in _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>, deletes the package contents, and fi-
     nally removes the package records (if an alternate package database di-
     rectory is specified, then it overrides the _/_v_a_r_/_d_b_/_p_k_g path shown
d103 2
a104 2
     to be deleted (unless more than one occurrence of the --ff option is giv-
     en).
d115 2
a116 2
     keyword denoting that this is a deinstallation) to see whether or not de-
     installation should continue.  A non-zero exit status means no, unless
@


1.2
log
@merge pkg_install-20030914.
@
text
@d1 1
a1 1
PKG_DELETE(1)               NetBSD Reference Manual              PKG_DELETE(1)
d21 6
a26 5
     _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s _i_n _t_h_e _p_a_c_k_a_g_e _r_e_c_o_r_d _d_i_r_e_c_t_o_r_y _(_/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-
     _n_a_m_e_>_/_)_.  _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L_, _+_D_E_I_N_S_T_A_L_L_, _+_R_E_Q_U_I_R_E
     _o_r _+_M_T_R_E_E___D_I_R_S _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e _f_o_r @@@@ccwwdd_, @@@@mmooddee
     _(_c_h_e_c_k _f_o_r _s_e_t_u_i_d_)_, @@@@ddiirrrrmm_, @@@@eexxeecc_, _a_n_d @@@@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e
     pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _i_n_s_t_a_l_l_e_d _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s_.
d150 1
a150 1
NetBSD 1.6.1_STABLE            September 2, 2003                             3
@


1.1
log
@install catman pages for pax and pkg_install.
@
text
@d8 1
a8 1
     ppkkgg__ddeelleettee [--DDddFFffnnOORRrrVVvv] [--pp _p_r_e_f_i_x] _p_k_g_-_n_a_m_e _._._.
d56 6
d91 3
a93 1
     nally removes the package records.
d99 4
d121 2
d126 3
a128 3
     after deleting them.  Passing the keywords _D_E_I_N_S_T_A_L_L and _P_O_S_T_-_D_E_I_N_S_T_A_L_L
     lets you potentially write only one program/script that handles all as-
     pects of installation and deletion.
d149 1
a149 1
NetBSD 1.6                       March 8, 1999                               3
@


1.1.1.1
log
@import pkg_install-20030914 from pkgsrc.
@
text
@d8 1
a8 1
     ppkkgg__ddeelleettee [--DDddFFffnnOORRrrVVvv] [--KK _p_k_g___d_b_d_i_r] [--pp _p_r_e_f_i_x] _p_k_g_-_n_a_m_e _._._.
a55 6
     --KK _p_k_g___d_b_d_i_r
             Set _p_k_g___d_b_d_i_r as the package database directory.  If this option
             isn't specified, then the package database directory is taken
             from the value of the environment variable PKG_DBDIR if it's set,
             otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.

d85 1
a85 3
     nally removes the package records (if an alternate package database di-
     rectory is specified, then it overrides the _/_v_a_r_/_d_b_/_p_k_g path shown
     above).
a90 4
     If a package has been marked as a pprreesseerrvveedd package, it will not be able
     to be deleted (unless more than one occurrence of the --ff option is giv-
     en).

a108 2
           ddeeiinnssttaallll _<_p_k_g_-_n_a_m_e_> _V_I_E_W_-_D_E_I_N_S_T_A_L_L
     before removing the package from a view, and as:
d112 3
a114 3
     after deleting them.  Passing the keywords _V_I_E_W_-_D_E_I_N_S_T_A_L_L, _D_E_I_N_S_T_A_L_L and
     _P_O_S_T_-_D_E_I_N_S_T_A_L_L lets you potentially write only one program/script that
     handles all aspects of installation and deletion.
d135 1
a135 1
NetBSD 1.6.1_STABLE            September 2, 2003                             3
@


1.1.1.2
log
@import pkg_install-20030923 from pkgsrc.
@
text
@d1 1
a1 1
PKG_DELETE(1)           NetBSD General Commands Manual           PKG_DELETE(1)
d21 5
a25 6
     _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s _i_n _t_h_e _p_a_c_k_a_g_e _r_e_c_o_r_d _d_i_r_e_c_t_o_r_y
     _(_/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>_/_)_.  _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L_,
     _+_D_E_I_N_S_T_A_L_L_, _+_R_E_Q_U_I_R_E _o_r _+_M_T_R_E_E___D_I_R_S _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e
     _f_o_r @@@@ccwwdd_, @@@@mmooddee _(_c_h_e_c_k _f_o_r _s_e_t_u_i_d_)_, @@@@ddiirrrrmm_, @@@@eexxeecc_, _a_n_d @@@@uunneexxeecc _d_i_r_e_c_-
     _t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _i_n_s_t_a_l_l_e_d _p_a_c_k_-
     _a_g_e _c_o_n_t_r_o_l _f_i_l_e_s_.
d149 1
a149 1
NetBSD 1.6                     September 2, 2003                    NetBSD 1.6
@


1.1.1.3
log
@import pkg_install-20040207 from pkgsrc.
@
text
@d39 2
a40 2
     --DD      If a deinstallation script exists for a given package, do not
             execute it.
d70 2
a71 2
             Set _p_r_e_f_i_x as the directory in which to delete files from any
             installed packages which do not explicitly set theirs.  For most
d75 4
a78 4
     --RR      This option triggers a recursive delete of the given package and
             any packages it depends on, unless some other package still needs
             a dependent package.  This --RR option can be used to clean up by
             deleting a package and all its then-unneeded dependent packages.
d80 2
a81 2
     --rr      ppkkgg__ddeelleettee first builds a list of all packages that require
             (directly and indirectly) the one being deleted.  It then deletes
d83 1
a83 3
             deleting the user specified package.  This --rr option can be used
             to recursively delete a package and all of the packages which
             depend on that package.
d91 3
a93 3
     records in _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>, deletes the package contents, and
     finally removes the package records (if an alternate package database
     directory is specified, then it overrides the _/_v_a_r_/_d_b_/_p_k_g path shown
d101 2
a102 2
     to be deleted (unless more than one occurrence of the --ff option is
     given).
d113 2
a114 2
     keyword denoting that this is a deinstallation) to see whether or not
     deinstallation should continue.  A non-zero exit status means no, unless
@


