@experiment.command()<EOL>@click.pass_context<EOL>@clean_outputs<EOL>def delete(ctx):
user, project_name, _experiment = get_project_experiment_or_local(ctx.obj.get('<STR_LIT>'),<EOL>ctx.obj.get('<STR_LIT>'))<EOL>if not click.confirm("<STR_LIT>".format(_experiment)):<EOL><INDENT>click.echo('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>try:<EOL><INDENT>response = PolyaxonClient().experiment.delete_experiment(<EOL>user, project_name, _experiment)<EOL>ExperimentManager.purge()<EOL><DEDENT>except (PolyaxonHTTPError, PolyaxonShouldExitError, PolyaxonClientException) as e:<EOL><INDENT>Printer.print_error('<STR_LIT>'.format(_experiment))<EOL>Printer.print_error('<STR_LIT>'.format(e))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>Printer.print_success("<STR_LIT>".format(_experiment))<EOL><DEDENT>
Delete experiment.

    Uses [Caching](/references/polyaxon-cli/#caching)

    Example:

    \b
    ```bash
    $ polyaxon experiment delete
    ```