---
type: api
title: Delete auto-follow patterns
description: Delete a collection of cross-cluster replication auto-follow patterns.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-ccr-delete-auto-follow-pattern
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-ccr-delete-auto-follow-pattern
products:
  - Elasticsearch
---

# Delete auto-follow patterns

Availability: 6.5+

## Paths

- `DELETE` `/_ccr/auto_follow/{name}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#bearerauth)

#### Path Parameters

- `name` (string Name)
  The auto-follow pattern collection to delete.

## Description

Delete a collection of cross-cluster replication auto-follow patterns.

## Required authorization

* Cluster privileges: `manage_ccr`

[Read the reference documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-auto-follow.html)

## Query String Parameters

- `master_timeout` (string Duration · default: 30s)
  The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request fails and returns an error.
It can also be set to `-1` to indicate that the request should never timeout.

## Response

`application/json`

- `acknowledged` (boolean)
  For a successful response, this value is always true. On failure, an exception is returned instead.
## Code Examples

#### Console

```console
DELETE /_ccr/auto_follow/my_auto_follow_pattern
```

#### JavaScript

```javascript
const response = await client.ccr.deleteAutoFollowPattern({
  name: "my_auto_follow_pattern",
});
```

#### Python

```python
resp = client.ccr.delete_auto_follow_pattern(
    name="my_auto_follow_pattern",
)
```

#### curl

```curl
curl -X DELETE "$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.ccr().deleteAutoFollowPattern(d -> d
    .name("my_auto_follow_pattern")
);
```

#### C#

```c#
var response = await client.CrossClusterReplication.DeleteAutoFollowPatternAsync(name: "my_auto_follow_pattern");
```

#### PHP

```php
$resp = $client->ccr()->deleteAutoFollowPattern([
    "name" => "my_auto_follow_pattern",
]);
```

#### Ruby

```ruby
response = client.ccr.delete_auto_follow_pattern(
  name: "my_auto_follow_pattern"
)
```

## Response Examples

#### Delete auto follow pattern response example1

A successful response from `DELETE /_ccr/auto_follow/my_auto_follow_pattern`, which deletes an auto-follow pattern.

```json
{
  "acknowledged" : true
}
```

