.TH "datalad remove" "1" "2024\-03\-10" "datalad remove 0.19.6" .SH NAME \fBdatalad remove\fR \- remove components from datasets .SH SYNOPSIS .nh .HP \fBdatalad remove\fR [-h] [-d\~DATASET] [--drop\~{datasets|all}] [--reckless\~{modification|availability|undead|kill}] [-m\~MESSAGE] [-J\~NJOBS] [--recursive] [--nocheck] [--nosave] [--if-dirty\~IF_DIRTY] [--version] [PATH ...] .hy .SH DESCRIPTION Removing "unlinks" a dataset component, such as a file or subdataset, from a dataset. Such a removal advances the state of a dataset, just like adding new content. A remove operation can be undone, by restoring a previous dataset state, but might require re\-obtaining file content and subdatasets from remote locations. .PP This command relies on the 'drop' command for safe operation. By default, only file content from datasets which will be uninstalled as part of a removal will be dropped. Otherwise file content is retained, such that restoring a previous version also immediately restores file content access, just as it is the case for files directly committed to Git. This default behavior can be changed to always drop content prior removal, for cases where a minimal storage footprint for local datasets installations is desirable. .PP Removing a dataset component is always a recursive operation. Removing a directory, removes all content underneath the directory too. If subdatasets are located under a to\-be\-removed path, they will be uninstalled entirely, and all their content dropped. If any subdataset can not be uninstalled safely, the remove operation will fail and halt. .PP Changed in version 0.16 More in\-depth and comprehensive safety\-checks are now performed by default. The ``\-\-if\-dirty`` argument is ignored, will be removed in a future release, and can be removed for a safe\-by\-default behavior. For other cases consider the ``\-\-reckless`` argument. The ``\-\-save`` argument is ignored and will be removed in a future release, a dataset modification is now always saved. Consider save's ``\-\-amend`` argument for post\-remove fix\-ups. The ``\-\-recursive`` argument is ignored, and will be removed in a future release. Removal operations are always recursive, and the parameter can be stripped from calls for a safe\-by\-default behavior. .PP Deprecated in version 0.16 The ``\-\-check`` argument will be removed in a future release. It needs to be replaced with ``\-\-reckless``. .PP .SS Examples .PP Permanently remove a subdataset (and all further subdatasets contained in it) from a dataset:: .PP % datalad remove \-d .PP Permanently remove a superdataset (with all subdatasets) from the filesystem:: .PP % datalad remove \-d .PP DANGER\-ZONE: Fast wipe\-out a dataset and all its subdataset, bypassing all safety checks:: .PP % datalad remove \-d \-\-reckless kill .SH OPTIONS .TP PATH path of a dataset or dataset component to be removed. Constraints: value must be a string or value must be NONE .TP \fB-h\fR, \fB--help\fR, \fB--help-np\fR show this help message. --help-np forcefully disables the use of a pager for displaying the help message .TP \fB-d\fR DATASET, \fB--dataset\fR DATASET specify the dataset to perform remove from. If no dataset is given, the current working directory is used as operation context. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) or value must be NONE .TP \fB--drop\fR {datasets|all} which dataset components to drop prior removal. This parameter is passed on to the underlying drop operation as its 'what' argument. Constraints: value must be one of ('datasets', 'all') [Default: 'datasets'] .TP \fB--reckless\fR {modification|availability|undead|kill} disable individual or all data safety measures that would normally prevent potentially irreversible data-loss. With 'modification', unsaved modifications in a dataset will not be detected. This improves performance at the cost of permitting potential loss of unsaved or untracked dataset components. With 'availability', detection of dataset/branch-states that are only available in the local dataset, and detection of an insufficient number of file-content copies will be disabled. Especially the latter is a potentially expensive check which might involve numerous network transactions. With 'undead', detection of whether a to-be-removed local annex is still known to exist in the network of dataset-clones is disabled. This could cause zombie-records of invalid file availability. With 'kill', all safety-checks are disabled. Constraints: value must be one of ('modification', 'availability', 'undead', 'kill') .TP \fB-m\fR MESSAGE, \fB--message\fR MESSAGE a description of the state or the changes made to a dataset. Constraints: value must be a string or value must be NONE .TP \fB-J\fR NJOBS, \fB--jobs\fR NJOBS how many parallel jobs (where possible) to use. "auto" corresponds to the number defined by 'datalad.runtime.max-annex-jobs' configuration item. Constraints: value must be convertible to type 'int' or value must be NONE or value must be one of ('auto',) .TP \fB--recursive\fR, \fB-r\fR DEPRECATED and IGNORED: removal is always a recursive operation. .TP \fB--nocheck\fR DEPRECATED: use '--reckless availability'. .TP \fB--nosave\fR DEPRECATED and IGNORED; use `save --amend` instead. .TP \fB--if-dirty\fR \fI\s-1IF_DIRTY\s0\fR DEPRECATED and IGNORED: use --reckless instead. .TP \fB--version\fR show the module and its version which provides the command .SH AUTHORS datalad is developed by The DataLad Team and Contributors .