Logic Machine Forum
How to purge Data Storage? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: How to purge Data Storage? (/showthread.php?tid=5980)



How to purge Data Storage? - gdimaria - 03.05.2025

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


RE: How to purge Data Storage? - admin - 05.05.2025

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.


RE: How to purge Data Storage? - gdimaria - 06.05.2025

(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 *


RE: How to purge Data Storage? - admin - 06.05.2025

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



RE: How to purge Data Storage? - gdimaria - 06.05.2025

(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!