# Bulk remove keys from the Persistence Store

**URL:** <https://community.dynatrace.com/t/bulk-remove-keys-from-the-persistence-store/37798>\
**Category:** Developer Q&A Forum\
**Tags:** platform-services\
**Created:** [December 27, 2022, 11:10am UTC](https://community.dynatrace.com/t/bulk-remove-keys-from-the-persistence-store/37798 "2022-12-27T11:10:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![david\_petroni](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/david_petroni/32/1420_2.png) [@david\_petroni](https://community.dynatrace.com/u/david_petroni)\
**Post date:** [December 27, 2022, 11:10am UTC](https://community.dynatrace.com/t/bulk-remove-keys-from-the-persistence-store/37798/1 "2022-12-27T11:10:49Z")

</div>

Hello,

when using&nbsp;[Store app and user states | Dynatrace Developer](https://developer.dynatrace.com/develop/data/state/), we found out that we sometimes need to remove multiple keys at once - most of the times, related to the modification date.

We are right now querying for all the keys with some filter, and then we’re removing them one by one (or better, in junks using multiple promises at once).

Is there a better option?

Thanks!

---

<div class="post-metadata">

**Author:** ![christian\_barth](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/christian_barth/32/34060_2.png) [@christian\_barth](https://community.dynatrace.com/u/christian_barth)\
**Post date:** [December 28, 2022, 9:13am UTC](https://community.dynatrace.com/t/bulk-remove-keys-from-the-persistence-store/37798/2 "2022-12-28T09:13:49Z")

</div>

Hi David,

To my knowledge, there’s no better option for now.&nbsp;  
I’ll double-check this with the responsible team when they return from winter vacation.

---

<div class="post-metadata">

**Author:** ![michael\_k](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@michael\_k](https://community.dynatrace.com/u/michael_k)\
**Post date:** [January 26, 2023, 11:51am UTC](https://community.dynatrace.com/t/bulk-remove-keys-from-the-persistence-store/37798/3 "2023-01-26T11:51:53Z")

</div>

Hi, a “delete everything” operation has been added this sprint! (not yet available on demo dev but should be there soon, please stay tuned)

---

<div class="post-metadata">

**Author:** ![david\_petroni](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/david_petroni/32/1420_2.png) [@david\_petroni](https://community.dynatrace.com/u/david_petroni)\
**Post date:** [March 16, 2023, 10:14am UTC](https://community.dynatrace.com/t/bulk-remove-keys-from-the-persistence-store/37798/4 "2023-03-16T10:14:58Z")

</div>

Hello Michael, FYI, we would like to have a delete using a filter, not a delete everything operation. So basically something with this signature:

```javascript
deleteAppStates(config: {
  filter?: string;
  abortSignal?: AbortSignal;
}): Promise<void>

```

The option to remove everything is not really useful for us, but thanks for letting me know 🙂
