1datalad drop(1) General Commands Manual datalad drop(1)
2
3
4
6 datalad drop - drop content of individual files or entire (sub)datasets
7
9 datalad drop [-h] [--what {filecontent|allkeys|datasets|all}]
10 [--reckless {modification|availability|undead|kill}]
11 [-d DATASET] [-r] [-R LEVELS] [-J NJOBS] [--nocheck] [--if-
12 dirty IF_DIRTY] [--version] [PATH ...]
13
14
15
17 This command is the antagonist of 'get'. It can undo the retrieval of
18 file content, and the installation of subdatasets.
19
20 Dropping is a safe-by-default operation. Before dropping any informa‐
21 tion, the command confirms the continued availability of file-content
22 (see e.g., configuration 'annex.numcopies'), and the state of all
23 dataset branches from at least one known dataset sibling. Moreover,
24 prior removal of an entire dataset annex, that it is confirmed that it
25 is no longer marked as existing in the network of dataset siblings.
26
27 Importantly, all checks regarding version history availability and lo‐
28 cal annex availability are performed using the current state of remote
29 siblings as known to the local dataset. This is done for performance
30 reasons and for resilience in case of absent network connectivity. To
31 ensure decision making based on up-to-date information, it is advised
32 to execute a dataset update before dropping dataset components.
33
34 Examples
35 Drop single file content::
36
37 % datalad drop <path/to/file>
38
39 Drop all file content in the current dataset::
40
41 % datalad drop
42
43 Drop all file content in a dataset and all its subdatasets::
44
45 % datalad drop -d <path/to/dataset> -r
46
47 Disable check to ensure the configured minimum number of remote sources
48 for dropped data::
49
50 % datalad drop <path/to/content> --reckless availability
51
52 Drop (uninstall) an entire dataset (will fail with subdatasets
53 present)::
54
55 % datalad drop --what all
56
57 Kill a dataset recklessly with any existing subdatasets too(this will
58 be fast, but will disable any and all safety checks)::
59
60 % datalad drop --what all, --reckless kill --recursive
61
62
64 PATH path of a dataset or dataset component to be dropped. Con‐
65 straints: value must be a string or value must be NONE
66
67
68 -h, --help, --help-np
69 show this help message. --help-np forcefully disables the use of
70 a pager for displaying the help message
71
72 --what {filecontent|allkeys|datasets|all}
73 select what type of items shall be dropped. With 'filecontent',
74 only the file content (git-annex keys) of files in a dataset's
75 worktree will be dropped. With 'allkeys', content of any version
76 of any file in any branch (including, but not limited to the
77 worktree) will be dropped. This effectively empties the annex of
78 a local dataset. With 'datasets', only complete datasets will be
79 dropped (implies 'allkeys' mode for each such dataset), but no
80 filecontent will be dropped for any files in datasets that are
81 not dropped entirely. With 'all', content for any matching file
82 or dataset will be dropped entirely. Constraints: value must be
83 one of ('filecontent', 'allkeys', 'datasets', 'all') [Default:
84 'filecontent']
85
86 --reckless {modification|availability|undead|kill}
87 disable individual or all data safety measures that would nor‐
88 mally prevent potentially irreversible data-loss. With 'modifi‐
89 cation', unsaved modifications in a dataset will not be detect‐
90 ed. This improves performance at the cost of permitting poten‐
91 tial loss of unsaved or untracked dataset components. With
92 'availability', detection of dataset/branch-states that are only
93 available in the local dataset, and detection of an insufficient
94 number of file-content copies will be disabled. Especially the
95 latter is a potentially expensive check which might involve nu‐
96 merous network transactions. With 'undead', detection of whether
97 a to-be-removed local annex is still known to exist in the net‐
98 work of dataset-clones is disabled. This could cause zombie-
99 records of invalid file availability. With 'kill', all safety-
100 checks are disabled. Constraints: value must be one of ('modifi‐
101 cation', 'availability', 'undead', 'kill')
102
103 -d DATASET, --dataset DATASET
104 specify the dataset to perform drop from. If no dataset is giv‐
105 en, the current working directory is used as operation context.
106 Constraints: Value must be a Dataset or a valid identifier of a
107 Dataset (e.g. a path) or value must be NONE
108
109 -r, --recursive
110 if set, recurse into potential subdatasets.
111
112 -R LEVELS, --recursion-limit LEVELS
113 limit recursion into subdatasets to the given number of levels.
114 Constraints: value must be convertible to type 'int' or value
115 must be NONE
116
117 -J NJOBS, --jobs NJOBS
118 how many parallel jobs (where possible) to use. "auto" corre‐
119 sponds to the number defined by 'datalad.runtime.max-annex-jobs'
120 configuration item. Constraints: value must be convertible to
121 type 'int' or value must be NONE or value must be one of ('au‐
122 to',)
123
124 --nocheck
125 DEPRECATED: use '--reckless availability'.
126
127 --if-dirty IF_DIRTY
128 DEPRECATED and IGNORED: use --reckless instead.
129
130 --version
131 show the module and its version which provides the command
132
134 datalad is developed by The DataLad Team and Contributors <team@datal‐
135 ad.org>.
136
137
138
139datalad drop 0.19.3 2023-08-11 datalad drop(1)