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

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?

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.