# DETETE snapshot using DATE MATH

**URL:** <https://discuss.elastic.co/t/detete-snapshot-using-date-math/155406>\
**Category:** Elasticsearch\
**Created:** [November 5, 2018, 1:41pm UTC](https://discuss.elastic.co/t/detete-snapshot-using-date-math/155406 "2018-11-05T13:41:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hzarrabi](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@hzarrabi](https://discuss.elastic.co/u/hzarrabi)\
**Post date:** [November 5, 2018, 1:41pm UTC](https://discuss.elastic.co/t/detete-snapshot-using-date-math/155406/1 "2018-11-05T13:41:59Z")

</div>

```
Hello,

I'm trying to DELETE snapshots using DATE MATH.

After creating daily snapshot by using DATE MATH descriptors
PUT /_snapshot/ES_Backup/%3Csnapshot-%7Bnow%2Fd%7D%3E

I would like to delete those older then 7 days using

```

# DELETE /\<snapshot-{now/d-7d}\>

```
DETELE /_snapshot/ES_Backup/%3Csnapshot-%7Bnow%2Fd-7d%7D%3E

```

I'm getting the following error

```
   {
  "error": {
    "root_cause": [
      {
        "type": "snapshot_missing_exception",
        "reason": "[ES_Backup:<snapshot-{now/d}>] is missing"
      }
    ],
    "type": "snapshot_missing_exception",
    "reason": "[ES_Backup:<snapshot-{now/d}>] is missing"
  },
  "status": 404
} 

Is there any way to delete snapshots using DATE MATH ?

Regards
```

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 5, 2018, 2:01pm UTC](https://discuss.elastic.co/t/detete-snapshot-using-date-math/155406/2 "2018-11-05T14:01:13Z")

</div>

Setup and use [Elasticsearch Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/index.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 3, 2018, 2:01pm UTC](https://discuss.elastic.co/t/detete-snapshot-using-date-math/155406/3 "2018-12-03T14:01:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
