This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

How to purge Data Storage?
#1
Hi, I would like to clean Data Storage.

I know I can use storage.delete(key) but I would do it in a time with a script, without the need to know every single key.

is it possible to do?

Peppe
Reply
#2
You can delete everything with a single command but it will also drop configuration for apps that use storage (Mosaic, new Visu etc). Explain your use case for this.
Reply
#3
(05.05.2025, 05:28)admin Wrote: You can delete everything with a single command but it will also drop configuration for apps that use storage (Mosaic, new Visu etc). Explain your use case for this.


I will have no problem for apps configuration in this LM right now... I just have so much useless key-value. 

But would be nice to can delete the keys by wildcard *
Reply
#4
To delete everything from the storage go to Utilities > Reset / clean-up and select "Script and application storage".

Or you can use a script with a wildcard:
Code:
keys = storage.keys('values*')
for _, key in ipairs(keys) do
  storage.delete(key)
end
Reply
#5
(06.05.2025, 06:36)admin Wrote: To delete everything from the storage go to Utilities > Reset / clean-up and select "Script and application storage".

Or you can use a script with a wildcard:
Code:
keys = storage.keys('values*')
for _, key in ipairs(keys) do
  storage.delete(key)
end

Thanks so much!
Reply


Forum Jump: