﻿---
title: stack es ml delete-job cli command
description: Delete an anomaly detection job. Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://docs-v3-preview.elastic.dev/elastic/cli/pull/472/cli/stack/es/ml/delete-job
---

# stack es ml delete-job cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack es ml delete-job --job-id <job-id> [options]
```

Delete an anomaly detection job.
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--job-id string required">
    Identifier for the anomaly detection job.
  </definition>
  <definition term="--[no-]force">
    Use to forcefully delete an opened job; this method is quicker than closing and deleting the job.
  </definition>
  <definition term="--[no-]delete-user-annotations">
    Specifies whether annotations that have been added by the user should be deleted along with any auto-generated annotations when the job is reset.
  </definition>
  <definition term="--[no-]wait-for-completion">
    Specifies whether the request should return immediately or wait until the job deletion completes.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--[no-]dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--[no-]json">
    output as JSON
  </definition>
</definitions>