4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24 .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28 .\" Copyright (c) 2014 Integros [integros.com]
29 .\" Copyright 2019 Richard Laager. All rights reserved.
30 .\" Copyright 2018 Nexenta Systems, Inc.
31 .\" Copyright 2019 Joyent, Inc.
37 .Nm zfs Ns Pf - Cm destroy
38 .Nd Destroys the given dataset(s), snapshot(s), or bookmark.
43 .Ar filesystem Ns | Ns Ar volume
47 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
48 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
51 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
58 .Ar filesystem Ns | Ns Ar volume
60 Destroys the given dataset.
61 By default, the command unshares any file systems that are currently shared,
62 unmounts any file systems that are currently mounted, and refuses to destroy a
63 dataset that has active dependents
64 .Pq children or clones .
67 Recursively destroy all dependents, including cloned file systems outside the
70 Force an unmount of any file systems using the
73 This option has no effect on non-file systems or unmounted file systems.
78 No data will be deleted.
79 This is useful in conjunction with the
83 flags to determine what data would be deleted.
85 Print machine-parsable verbose information about the deleted data.
87 Recursively destroy all children.
89 Print verbose information about the deleted data.
92 Extreme care should be taken when applying either the
96 options, as they can destroy large portions of a pool and cause unexpected
97 behavior for mounted file systems in use.
102 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
103 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
105 The given snapshots are destroyed immediately if and only if the
109 option would have destroyed it.
110 Such immediate destruction would occur, for example, if the snapshot had no
111 clones and the user-initiated reference count were zero.
113 If a snapshot does not qualify for immediate destruction, it is marked for
115 In this state, it exists as a usable, visible snapshot until both of the
116 preconditions listed above are met, at which point it is destroyed.
118 An inclusive range of snapshots may be specified by separating the first and
119 last snapshots with a percent sign.
120 The first and/or last snapshots may be left blank, in which case the
121 filesystem's oldest or newest snapshot will be implied.
124 .Pq or ranges of snapshots
125 of the same filesystem or volume may be specified in a comma-separated list of
127 Only the snapshot's short name
128 .Po the part after the
131 should be specified when using a range or comma-separated list to identify
135 Recursively destroy all clones of these snapshots, including the clones,
136 snapshots, and children.
137 If this flag is specified, the
139 flag will have no effect.
141 Destroy immediately. If a snapshot cannot be destroyed now, mark it for
142 deferred destruction.
147 No data will be deleted.
148 This is useful in conjunction with the
152 flags to determine what data would be deleted.
154 Print machine-parsable verbose information about the deleted data.
157 .Pq or mark for deferred deletion
158 all snapshots with this name in descendent file systems.
160 Print verbose information about the deleted data.
162 Extreme care should be taken when applying either the
166 options, as they can destroy large portions of a pool and cause unexpected
167 behavior for mounted file systems in use.
172 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
174 The given bookmark is destroyed.