Updated
On this page
Reference for the saferm delete command — usage, flags, arguments, and examples for the delete subcommand of the saferm CLI.
#saferm delete
Move files to the saferm archive with metadata tracking
Effect: mutating
#Flags
| Name | Short | Type | Default | Env | Description |
|---|---|---|---|---|---|
--recursive | -r | bool | Allow recursive deletion of directories and all their contents | ||
--ignore-missing | -f | bool | Silently skip files that do not exist instead of erroring | ||
--interactive | -i | bool | Prompt for confirmation before archiving each file | ||
--description | str | Mandatory explanation of why this deletion is happening | |||
--command | str | Record the original rm command being replaced by saferm | |||
--meta | str | Attach additional metadata as key=value pairs (repeatable) | |||
--update-git-index | bool | True | Run git rm --cached to stage removal in the git index |
#Arguments
| Name | Required | Description |
|---|---|---|
files | yes | One or more files or directories to move into the archive |
#Grants
| Kind | Name | Reason |
|---|---|---|
| proc_mutate | git-index | a tracked file that moved into the archive must leave the git index too, or the next commit resurrects it |