Is there an easy way of deleting all retained messages from the server ?
Can I just delete all files/folders under: /var/lib/vernemq/msgstore ?
“vmq-admin retain delete”, just deletes one at a time. I messed up by a few thousand messages retained…
You can also experiment with mosquitto_sub--remove-retained flag although practically this means that the user needs to have very broad subscribe and publish permissions.
I hope this helps somewhat
Btw, note that retained messages are part of metadata, that is not part of the files under msgstore. You could delete everything under /var/lib/vernemq after a node stop and then reboot. But this will give you an entirely reset and fresh VerneMQ node. While this can be a solution for a single Verne server, it’s certainly not a viable approach in a clustered setup.