content/kapacitor/v1/working/flux/manage/delete.md
Use the kapacitor CLI or the Kapacitor HTTP API to delete Kapacitor Flux tasks.
Provide the task ID to delete.
Task IDs are provided in task list output.
{{< tabs-wrapper >}} {{% tabs %}} CLI API {{% /tabs %}}
<!----------------------------- BEGIN CLI content ----------------------------->{{% tab-content %}}
Use the kapacitor flux task delete command to delete a Kapacitor Flux task.
Provide the following flag:
{{< req type="key" >}}
-i, --id: Task ID to deletekapacitor flux task delete --id 000x00xX0xXXx00
{{% /tab-content %}}
<!------------------------------ END CLI content ------------------------------> <!----------------------------- BEGIN API content ----------------------------->{{% tab-content %}}
Use the following request method and endpoint to delete a Kapacitor Flux task.
{{< api-endpoint method="delete" endpoint="/kapacitor/v1/api/v2/tasks/{taskID}" >}}
Provide the following with your request ({{< req type="key" >}}):
# Delete task ID 000x00xX0xXXx00
curl --request DELETE 'http://localhost:9092/kapacitor/v1/api/v2/tasks/000x00xX0xXXx00'
{{% /tab-content %}}
<!------------------------------ END API content ------------------------------>{{< /tabs-wrapper >}}