# How can I delete all keys in local storage?(When I don't know the key)

**URL:** <https://community.thunkable.com/t/how-can-i-delete-all-keys-in-local-storage-when-i-dont-know-the-key/399736>\
**Category:** Questions about Thunkable X\
**Created:** [January 9, 2020, 8:30pm UTC](https://community.thunkable.com/t/how-can-i-delete-all-keys-in-local-storage-when-i-dont-know-the-key/399736 "2020-01-09T20:30:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 9, 2020, 8:30pm UTC](https://community.thunkable.com/t/how-can-i-delete-all-keys-in-local-storage-when-i-dont-know-the-key/399736/1 "2020-01-09T20:30:56Z")

</div>

There are 12000 keys in local storage.  
Assuming I don’t know the key, how can I delete all keys in local storage?

When I test my app  
What should I do if I want to initialize local storage?  
Is there any other way than deleting the key?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [January 10, 2020, 7:23am UTC](https://community.thunkable.com/t/how-can-i-delete-all-keys-in-local-storage-when-i-dont-know-the-key/399736/2 "2020-01-10T07:23:17Z")

</div>

When saving data to Local Storage, you must also save the keys in the list. This will allow you to loop through the list of keys and delete them from the Local Storage.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/how-can-i-delete-all-keys-in-local-storage-when-i-dont-know-the-key/399736/3 "2024-11-08T11:46:06Z")

</div>


