Wed Feb 24 21:11:27 2010 UTC ()
Improve wording, remove unneeded Bk/Ek, various minor fixes.


(wiz)
diff -r1.26 -r1.27 pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.1

cvs diff -r1.26 -r1.27 pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.1 (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.1 2010/01/22 13:30:41 1.26
+++ pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.1 2010/02/24 21:11:27 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: pkg_delete.1,v 1.26 2010/01/22 13:30:41 joerg Exp $ 1.\" $NetBSD: pkg_delete.1,v 1.27 2010/02/24 21:11:27 wiz Exp $
2.\" 2.\"
3.\" FreeBSD install - a package for the installation and maintenance 3.\" FreeBSD install - a package for the installation and maintenance
4.\" of non-core utilities. 4.\" of non-core utilities.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
@@ -16,52 +16,47 @@ @@ -16,52 +16,47 @@
16.\" 16.\"
17.\" 17.\"
18.\" from FreeBSD: @(#)pkg_delete.1 18.\" from FreeBSD: @(#)pkg_delete.1
19.\" 19.\"
20.Dd January 20, 2010 20.Dd January 20, 2010
21.Dt PKG_DELETE 1 21.Dt PKG_DELETE 1
22.Os 22.Os
23.Sh NAME 23.Sh NAME
24.Nm pkg_delete 24.Nm pkg_delete
25.Nd a utility for deleting previously installed software package distributions 25.Nd a utility for deleting previously installed software package distributions
26.Sh SYNOPSIS 26.Sh SYNOPSIS
27.Nm 27.Nm
28.Op Fl ADFfkNnORrVv 28.Op Fl ADFfkNnORrVv
29.Bk -words 
30.Op Fl K Ar pkg_dbdir 29.Op Fl K Ar pkg_dbdir
31.Ek 
32.Bk -words 
33.Op Fl P Ar destdir 30.Op Fl P Ar destdir
34.Op Fl p Ar prefix 31.Op Fl p Ar prefix
35.Ek 
36.Ar pkg-name ... 32.Ar pkg-name ...
37.Sh DESCRIPTION 33.Sh DESCRIPTION
38The 34The
39.Nm 35.Nm
40command is used to delete packages that have been previously installed 36command is used to delete packages that have been previously installed
41with the 37with the
42.Xr pkg_add 1 38.Xr pkg_add 1
43command. 39command.
44The given packages are sorted, so that the dependencies of a package 40The given packages are sorted, so that the dependencies needed by a
45are deleted after the package. 41package are deleted after the package.
46Before any action is executed, 42Before any action is executed,
47.Nm 43.Nm
48checks for packages that are marked as 44checks for packages that are marked as
49.Cm preserved 45.Cm preserved
50or have depending packages left. 46or have depending packages left.
51If the 47If the
52.Fl k 48.Fl k
53flag is given, preserved packages are removed from the list of packages 49flag is given, preserved packages are skipped and not removed.
54to remove. 
55Unless the 50Unless the
56.Fl f 51.Fl f
57flag is given, 52flag is given,
58.Nm 53.Nm
59stops on the first error. 54stops on the first error.
60.Sh WARNING 55.Sh WARNING
61.Bf -emphasis 56.Bf -emphasis
62Since the 57Since the
63.Nm 58.Nm
64command may execute scripts or programs provided by a package file, 59command may execute scripts or programs provided by a package file,
65your system may be susceptible to 60your system may be susceptible to
66.Dq Trojan horses 61.Dq Trojan horses
67or other subtle 62or other subtle
@@ -104,76 +99,80 @@ If the @@ -104,76 +99,80 @@ If the
104flag is given, one or more (absolute) filenames may be specified and 99flag is given, one or more (absolute) filenames may be specified and
105the Package Database will be consulted for the package to which the 100the Package Database will be consulted for the package to which the
106given file belongs. 101given file belongs.
107These packages are then deinstalled. 102These packages are then deinstalled.
108.It Fl A 103.It Fl A
109Recursively remove all automatically installed packages that were needed 104Recursively remove all automatically installed packages that were needed
110by the given packages and are no longer required. 105by the given packages and are no longer required.
111See also the 106See also the
112.Fl R 107.Fl R
113flag. 108flag.
114.It Fl D 109.It Fl D
115If a deinstallation script exists for a given package, do not execute it. 110If a deinstallation script exists for a given package, do not execute it.
116.It Fl F 111.It Fl F
117Any pkg-name given will be interpreted as pathname which is 112Any
 113.Ar pkg-name
 114given will be interpreted as pathname which is
118subsequently transformed in a (real) package name via the Package 115subsequently transformed in a (real) package name via the Package
119Database. 116Database.
120That way, packages can be deleted by giving a filename 117That way, packages can be deleted by giving a filename
121instead of the package-name. 118instead of the package-name.
122.It Fl f 119.It Fl f
123Force removal of the package, even if a dependency is recorded or the 120Force removal of the package, even if a dependency is recorded or the
124deinstall script fails. 121deinstall script fails.
125.It Fl ff 122.It Fl ff
126Force removal of the package, even if the package is marked as a 123Force removal of the package, even if the package is marked as a
127.Cm preserved 124.Cm preserved
128package. 125package.
129Note that this is a dangerous operation. 126Note that this is a dangerous operation.
130See also the 127See also the
131.Fl k 128.Fl k
132option. 129option.
133.It Fl K Ar pkg_dbdir 130.It Fl K Ar pkg_dbdir
134Override the value of the 131Override the value of the
135.Dv PKG_DBDIR 132.Dv PKG_DBDIR
136configuration option with the value 133configuration option with the value
137.Ar pkg_dbdir . 134.Ar pkg_dbdir .
138.It Fl k 135.It Fl k
139Silently skip all packages that are marked as 136Silently skip all packages that are marked as
140.Cm preserved . 137.Cm preserved .
141.It Fl N 138.It Fl N
142Remove the package's registration and its entries from the package database, 139Remove the package's registration and its entries from the package database,
143but leave the files installed. 140but leave the files installed.
144Don't run any deinstall scripts or @unexec lines either. 141Don't run any deinstall scripts or
 142.Cm @unexec
 143lines either.
145.It Fl n 144.It Fl n
146Don't actually deinstall a package, just report the steps that 145Don't actually deinstall a package, just report the steps that
147would be taken if it were. 146would be taken.
148.It Fl O 147.It Fl O
149Only delete the package's entries from the package database, do not 148Only delete the package's entries from the package database; do not
150touch the package or its files itself. 149touch the package or its files itself.
151.It Fl p Ar destdir 150.It Fl P Ar destdir
152Prefix all file and directory names with 151Prefix all file and directory names with
153.Ar destdir . 152.Ar destdir .
154For packages without install scripts this has the same behavior as 153For packages without install scripts this has the same behavior as
155using chroot. 154using chroot.
156.It Fl p Ar prefix 155.It Fl p Ar prefix
157Set 156Set
158.Ar prefix 157.Ar prefix
159as the directory in which to delete files from any installed packages 158as the directory in which to delete files from any installed packages
160which do not explicitly set theirs. 159which do not explicitly set theirs.
161For most packages, the prefix will 160For most packages, the prefix will
162be set automatically to the installed location by 161be set automatically to the installed location by
163.Xr pkg_add 1 . 162.Xr pkg_add 1 .
164.It Fl R 163.It Fl R
165Recursively remove all packages that were needed by the given packages 164Recursively remove all packages that were needed by the given packages
166and that have no other dependencies left. 165and are no longer required, even if they were installed manually.
167This option overrides the 166This option overrides the
168.Fl A 167.Fl A
169flag. 168flag.
170.It Fl r 169.It Fl r
171Recursively remove all packages that require one of the packages given. 170Recursively remove all packages that require one of the packages given.
172.It Fl V 171.It Fl V
173Print version number and exit. 172Print version number and exit.
174.It Fl v 173.It Fl v
175Turn on verbose output. 174Turn on verbose output.
176.El 175.El
177.Sh TECHNICAL DETAILS 176.Sh TECHNICAL DETAILS
178.Nm 177.Nm
179does pretty much what it says. 178does pretty much what it says.
@@ -188,28 +187,29 @@ will list those dependent packages and r @@ -188,28 +187,29 @@ will list those dependent packages and r
188.Fl f 187.Fl f
189option is given). 188option is given).
190.Pp 189.Pp
191If a package has been marked as a 190If a package has been marked as a
192.Cm preserved 191.Cm preserved
193package, it will not be able to be deleted 192package, it will not be able to be deleted
194(unless more than one occurrence of the 193(unless more than one occurrence of the
195.Fl f 194.Fl f
196option is given). 195option is given).
197.Pp 196.Pp
198If a filename is given instead of a package name, the package of which 197If a filename is given instead of a package name, the package of which
199the given file belongs to can be deleted if the 198the given file belongs to can be deleted if the
200.Fl F 199.Fl F
201Flag is given. 200flag is given.
202The filename needs to be absolute, see the output produced by the pkg_info 201The filename needs to be absolute, see the output produced by the
 202.Xr pkg_info 1
203.Fl aF 203.Fl aF
204command. 204command.
205.Pp 205.Pp
206If a 206If a
207.Cm deinstall 207.Cm deinstall
208script exists for the package, it is executed before and after 208script exists for the package, it is executed before and after
209any files are removed. 209any files are removed.
210It is this script's responsibility to clean up any additional messy details 210It is this script's responsibility to clean up any additional messy details
211around the package's installation, since all 211around the package's installation, since all
212.Nm 212.Nm
213knows how to do is delete the files created in the original distribution. 213knows how to do is delete the files created in the original distribution.
214The 214The
215.Ic deinstall 215.Ic deinstall
@@ -224,27 +224,27 @@ before removing the package from a view, @@ -224,27 +224,27 @@ before removing the package from a view,
224.Cm deinstall 224.Cm deinstall
225.Aq Ar pkg-name 225.Aq Ar pkg-name
226.Ar DEINSTALL 226.Ar DEINSTALL
227.Ed 227.Ed
228before deleting all files and as: 228before deleting all files and as:
229.Bd -filled -offset indent -compact 229.Bd -filled -offset indent -compact
230.Cm deinstall 230.Cm deinstall
231.Aq Ar pkg-name 231.Aq Ar pkg-name
232.Ar POST-DEINSTALL 232.Ar POST-DEINSTALL
233.Ed 233.Ed
234after deleting them. 234after deleting them.
235Passing the keywords 235Passing the keywords
236.Ar VIEW-DEINSTALL , 236.Ar VIEW-DEINSTALL ,
237.Ar DEINSTALL 237.Ar DEINSTALL ,
238and 238and
239.Ar POST-DEINSTALL 239.Ar POST-DEINSTALL
240lets you potentially write only one program/script that handles all 240lets you potentially write only one program/script that handles all
241aspects of installation and deletion. 241aspects of installation and deletion.
242.Pp 242.Pp
243All scripts are called with the environment variable 243All scripts are called with the environment variable
244.Ev PKG_PREFIX 244.Ev PKG_PREFIX
245set to the installation prefix (see the 245set to the installation prefix (see the
246.Fl p 246.Fl p
247option above). 247option above).
248This allows a package author to write a script 248This allows a package author to write a script
249that reliably performs some action on the directory where the package 249that reliably performs some action on the directory where the package
250is installed, even if the user might have changed it by specifying the 250is installed, even if the user might have changed it by specifying the