# Deleting all snapshots without "destroying" repository?

**URL:** <https://discuss.elastic.co/t/deleting-all-snapshots-without-destroying-repository/229661>\
**Category:** Elasticsearch\
**Created:** [April 24, 2020, 1:15pm UTC](https://discuss.elastic.co/t/deleting-all-snapshots-without-destroying-repository/229661 "2020-04-24T13:15:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arp](https://discuss.elastic.co/u/Arp)\
**Post date:** [April 24, 2020, 1:15pm UTC](https://discuss.elastic.co/t/deleting-all-snapshots-without-destroying-repository/229661/1 "2020-04-24T13:15:44Z")

</div>

Hi,

I have a repository with a bunch of snapshots in it, all for testing. I wanted to delete them all using  
`curl -X DELETE localhost:9200/_snapshot/backup/_all?pretty`

But afterwards, if I want to get info on the repository, it says "repository\_missing\_exception".  
I need to register the repository again in order to be able to take snapshots again.

Is there a clean way to delete all snapshots, but keeping the repository?

edit: Strange, if I try it all again, it says that the snapshotname is not known...  
But then the core problem remains. How do I delete all snapshots at once?

Thx.

---

<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:** [May 22, 2020, 1:15pm UTC](https://discuss.elastic.co/t/deleting-all-snapshots-without-destroying-repository/229661/2 "2020-05-22T13:15:45Z")

</div>

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