Command for clear LocalStorage from CLI

Hi all,

Is there a way to force the clean of LocalStorage when debugging (when launching ionic run ).
Actually i launch my app on my device, and i would like to have a clean localStorage for my tests.
Maybe via an option in the CLI (idk if it’s possible technically) ?

Or there is another way ?

Try this method:


1 Like

Thanks for your reply.
This method woks only in the code, i would like to know if there is a way to do it when i run my app for testing/debugging via the CLI ?

Can’t you use the chrome debugger?

If you just go to the chrome console and run localStorage.clear() it is done.

Thx mathijsliquix, i didnt know that i could use chrome console for that. It could be a way to do it.