Matter File Cleanup

Does anybody have a script to clean up the Matter files that are created under /userdata/matter/ ?

So far, I have over 5000+ files in there.

I’m running org.openhab.binding.matter-5.3.0-20260321.033057-78.jar version.

Best, Jay

I’ll look into it, there was a migration of the underlying matter sdk file format in the 5.2.x version, the old file are being kept as a safeguard if something went wrong there, so there is likely 2x the number of files. The SDK does create a lots and lots of files to represent matter devices, endpoints, attributes, and metadata, the idea AFAIK was to limit the number of writes to disk over time, as many of these are written once, and then very infrequently change. In the mean time i would not mess with that unless you really know what you are doing and understand the matters.js library and changes happening there. I think they may also be moving storage formats again as they become HA’s default/only matter implementation as well.

Thank you! LMK when you know.

Yes, I had 5.1.3 Matter installed then went to 5.3.x Matter so probably double based on changes.

Best, Jay