1datalad remove(1)           General Commands Manual          datalad remove(1)
2
3
4

NAME

6       datalad remove - remove components from datasets
7

SYNOPSIS

9       datalad    remove    [-h]    [-d   DATASET]   [--drop   {datasets|all}]
10              [--reckless             {modification|availability|undead|kill}]
11              [-m  MESSAGE]  [-J  NJOBS]  [--recursive] [--nocheck] [--nosave]
12              [--if-dirty IF_DIRTY] [--version] [PATH ...]
13
14
15

DESCRIPTION

17       Removing "unlinks" a dataset component, such as a file  or  subdataset,
18       from  a  dataset.  Such a removal advances the state of a dataset, just
19       like adding new content. A remove operation can be undone, by restoring
20       a  previous  dataset state, but might require re-obtaining file content
21       and subdatasets from remote locations.
22
23       This command relies on the 'drop' command for safe  operation.  By  de‐
24       fault,  only  file  content  from datasets which will be uninstalled as
25       part of a removal will be dropped. Otherwise file content is  retained,
26       such  that  restoring a previous version also immediately restores file
27       content access, just as it is the case for files directly committed  to
28       Git.  This default behavior can be changed to always drop content prior
29       removal, for cases where a minimal storage footprint for local datasets
30       installations is desirable.
31
32       Removing  a dataset component is always a recursive operation. Removing
33       a directory, removes all content underneath the directory too. If  sub‐
34       datasets  are  located  under  a to-be-removed path, they will be unin‐
35       stalled entirely, and all their content dropped. If any subdataset  can
36       not be uninstalled safely, the remove operation will fail and halt.
37
38       Changed in version 0.16
39        More in-depth and comprehensive safety-checks are now performed by
40        default.
41        The ``--if-dirty`` argument is ignored, will be removed in
42        a  future  release, and can be removed for a safe-by-default behavior.
43       For
44        other cases consider the ``--reckless`` argument.
45        The ``--save`` argument is ignored and will be removed in a future
46        release, a dataset modification is now always saved. Consider save's
47        ``--amend`` argument for post-remove fix-ups.
48        The ``--recursive`` argument is ignored, and will be removed
49        in a future release. Removal operations are always recursive, and the
50        parameter can be stripped from calls for a safe-by-default behavior.
51
52       Deprecated in version 0.16
53        The ``--check`` argument will be removed in a future release.
54        It needs to be replaced with ``--reckless``.
55
56   Examples
57       Permanently remove a subdataset (and all further subdatasets  contained
58       in it) from a dataset::
59
60        % datalad remove -d <path/to/dataset> <path/to/subds>
61
62       Permanently  remove  a  superdataset  (with  all  subdatasets) from the
63       filesystem::
64
65        % datalad remove -d <path/to/dataset>
66
67       DANGER-ZONE: Fast wipe-out a dataset and all its subdataset,  bypassing
68       all safety checks::
69
70        % datalad remove -d <path/to/dataset> --reckless kill
71
72

OPTIONS

74       PATH   path  of  a  dataset  or  dataset  component to be removed. Con‐
75              straints: value must be a string or value must be NONE
76
77
78       -h, --help, --help-np
79              show this help message. --help-np forcefully disables the use of
80              a pager for displaying the help message
81
82       -d DATASET, --dataset DATASET
83              specify  the  dataset  to  perform remove from. If no dataset is
84              given, the current working directory is used as  operation  con‐
85              text. Constraints: Value must be a Dataset or a valid identifier
86              of a Dataset (e.g. a path) or value must be NONE
87
88       --drop {datasets|all}
89              which dataset components to drop prior removal.  This  parameter
90              is  passed on to the underlying drop operation as its 'what' ar‐
91              gument. Constraints: value must be one  of  ('datasets',  'all')
92              [Default: 'datasets']
93
94       --reckless {modification|availability|undead|kill}
95              disable  individual  or all data safety measures that would nor‐
96              mally prevent potentially irreversible data-loss. With  'modifi‐
97              cation',  unsaved modifications in a dataset will not be detect‐
98              ed. This improves performance at the cost of  permitting  poten‐
99              tial  loss  of  unsaved  or  untracked  dataset components. With
100              'availability', detection of dataset/branch-states that are only
101              available in the local dataset, and detection of an insufficient
102              number of file-content copies will be disabled.  Especially  the
103              latter  is a potentially expensive check which might involve nu‐
104              merous network transactions. With 'undead', detection of whether
105              a  to-be-removed local annex is still known to exist in the net‐
106              work of dataset-clones is disabled.  This  could  cause  zombie-
107              records  of  invalid file availability. With 'kill', all safety-
108              checks are disabled. Constraints: value must be one of ('modifi‐
109              cation', 'availability', 'undead', 'kill')
110
111       -m MESSAGE, --message MESSAGE
112              a  description  of  the  state or the changes made to a dataset.
113              Constraints: value must be a string or value must be NONE
114
115       -J NJOBS, --jobs NJOBS
116              how many parallel jobs (where possible) to  use.  "auto"  corre‐
117              sponds to the number defined by 'datalad.runtime.max-annex-jobs'
118              configuration item. Constraints: value must  be  convertible  to
119              type  'int'  or value must be NONE or value must be one of ('au‐
120              to',)
121
122       --recursive, -r
123              DEPRECATED and IGNORED: removal is always a recursive operation.
124
125       --nocheck
126              DEPRECATED: use '--reckless availability'.
127
128       --nosave
129              DEPRECATED and IGNORED; use `save --amend` instead.
130
131       --if-dirty IF_DIRTY
132              DEPRECATED and IGNORED: use --reckless instead.
133
134       --version
135              show the module and its version which provides the command
136

AUTHORS

138        datalad is developed by The DataLad Team and Contributors <team@datal‐
139       ad.org>.
140
141
142
143datalad remove 0.19.3             2023-08-11                 datalad remove(1)
Impressum