Scroll to navigation

datalad remove(1) General Commands Manual datalad remove(1)


datalad remove - remove components from datasets


datalad remove [-h] [-d DATASET] [-r] [--nocheck] [--nosave] [-m MESSAGE] [--if-dirty {fail,save-before,ignore}] [PATH ...]


This command can remove subdatasets and paths, including non-empty directories, from datasets. Removing a component implies dropping present content and uninstalling associated subdatasets. Subsequently, the component is "unregistered" from the respective dataset. This means that the component is no longer present on the file system.

By default, the availability of at least one remote copy is verified before file content is dropped. As these checks could lead to slow operation (network latencies, etc), they can be disabled.


Permanently remove a subdataset from a dataset and wipe out the subdataset association too::

% datalad remove -d <path/to/dataset> <path/to/subds>

Permanently remove a dataset and all subdatasets::

% datalad remove -d <path/to/dataset/> -r

Permanently remove a dataset and all subdatasets even if there are fewer than the configured minimum number of (remote) sources for data::

% datalad remove -d <path/to/dataset/> -r --nocheck


path/name of the component to be removed. Constraints: value must be a string

show this help message. --help-np forcefully disables the use of a pager for displaying the help message
specify the dataset to perform the operation on. If no dataset is given, an attempt is made to identify a dataset based on the PATH given. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path)
if set, recurse into potential subdataset.
whether to perform checks to assure the configured minimum number (remote) source for data. Give this option to skip checks.
by default all modifications to a dataset are immediately saved. Giving this option will disable this behavior.
a description of the state or the changes made to a dataset. Constraints: value must be a string
desired behavior if a dataset with unsaved changes is discovered: 'fail' will trigger an error and further processing is aborted; 'save-before' will save all changes prior any further action; 'ignore' let's datalad proceed as if the dataset would not have unsaved changes. [Default: 'save-before']


datalad is developed by The DataLad Team and Contributors <>.

2021-07-23 datalad remove 0.14.6