globus delete - Submit a delete task


globus delete [OPTIONS] — ENDPOINT_ID:PATH

globus delete [OPTIONS] ENDPOINT_ID --batch < INPUT_LINE(s)


The globus delete command submits an asynchronous task that deletes files and/or directories on the target endpoint.

globus delete has two modes. Single target, which deletes one file or one directory, and batch, which takes in several lines to delete multiple files or directories. See "Batch Input" below for more information.

Symbolic links are never followed - only unlinked (deleted).

Automatic Endpoint Activation

This command requires all endpoints it uses to be activated. It will attempt to auto-activate any endpoints that are not active, but if auto-activation fails, you will need to manually activate the endpoint. See globus endpoint activate for more details.

Batch Input

If you give a SOURCE_PATH without the --batch flag, you will submit a single-file or single-directory delete task. This has behavior similar to cp and cp -r, across endpoints.

Using --batch, globus delete can submit a task which deletes multiple files or directories. Lines are taken from stdin, respecting quotes, and every line is treated as a path to a file or directory to delete.

Lines are of the form PATH

Note that unlike globus transfer --recursive is not an option at the per line level, instead, if given with the original command, all paths that point to directories will be recursively deleted.

Empty lines and comments beginning with # are ignored.

Batch only requires an ENDPOINT before passing lines, on stdin, but if you pass an ENPDOINT:PATH on the original command, this path will be used as a prefixes to all paths on stdin.



Starts batch mode input for deletes, which takes in paths one line at a time from stdin to delete multiple files and/or directories. See "Batch Input" above for more information.

-r, --recursive

Delete any directories recursively. Note that unlike globus transfer this option need only be given once at the command level rather than per line if using batch input.

-f, ignore-missing

Ignore nonexistent files and directories. The task will succeed even if given paths do not exist.

--star-silent, --unsafe

Don’t prompt when the trailing character is a "*". Implicit in --batch.

By default, globus delete $ep_id:~/foo* will prompt before deleting if used in an interactive context.


Set a deadline in ISO time format for this to be canceled if not completed by. ISO format is YYYY-MM-DD or YYYY-MM-DD HH:MM:SS If hours minutes and seconds are not given they are assumed to be 00:00:00. This time must not be in the past or the task will not be submitted.


Don’t submit the task, but print submission data instead.


Set an optional label for the task. These are meant for human readability and ease of filtering the task list


Specify a submission id to use with this task. Submission id’s are generated using globus task generate-submission-id and prevent re-submission of a task with the same submission id in case of unreliable networks. Note that this is not the same id as the task’s id once it is submitted. If not specified the Globus CLI will still generate a submission id and safely resubmit tasks on network errors.


Submit the task even if one or more of the target endpoints are not currently activated. Once all target endpoints have been activated the task will begin normally. If this option is given, auto-activation will not be attempted on the target endpoints.


Comma separated list of task events which notify by email. on and off may be used to enable or disable notifications for all event types. Otherwise, use succeeded, failed, or inactive. e.g. --notify failed,inactive to skip notifications on successful tasks.

--map-http-status TEXT

Map non success HTTP response codes to exit codes other than 1. e.g. "--map-http-satus 403=0,404=0" would exit with 0 even if a 403 or 404 http error code was received. Valid exit codes are 0,1,50-99.

-F, --format [json|text]

Set the output format for stdout. Defaults to "text".

--jq, --jmespath EXPR

Supply a JMESPath expression to apply to json output. Takes precedence over any specified --format and forces the format to be json processed by this expression.

A full specification of the JMESPath language for querying JSON structures may be found at

-h, --help

Show help text for this command.

-v, --verbose

Control the level of output.

Use -v or --verbose to show warnings and any additional text output.

Use -vv to add informative logging.

Use -vvv to add debug logging and full stack on any errors. (equivalent to -v --debug)


Delete a single file.

$ ep_id=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus delete $ep_id:~/myfile.txt

Delete a directory recursively.

$ ep_id=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus delete $ep_id:~/mydir --recursive

Use the batch input method to transfer multiple files and or dirs.

$ ep_id=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus delete $ep_id --batch --recursive


0 on success.

1 if a network or server error occurred, unless --map-http-status has been used to change exit behavior on http error codes.

2 if the command was used improperly.

© 2010- The University of Chicago Legal