How to purge the retained MQTT messages?

Ref this post from 2019:

How to purge the retained messages?

If you have mqtt issues with tasmota devices, you can effectively clear mqtt retain messages with tasmota device manager. Take a look at this https://github.com/jziolkowski/tdm

And if you have other devices and detailed info check out this http://www.steves-internet-guide.com/mqtt-retained-messages-example/

You can also use this:

You purge a retained message by publishing an empty string to the topic as a retained message. It’s as simple as that.

You can do it directly from Developer tools > Services.

In the following screenshot, we are publishing an empty string (represented by two consecutive single quotes) to the topic your/topic/goes/here/ as a retained message (retain: true).

Screenshot from 2021-01-13 21-31-39

3 Likes

This is pretty simple, but is there a quick way to bulk purge? I am pretty well looking at this situation now as a device has left 20 odd retained messages in MQTT.
Bit of a pain to purge them one at a time.
I have not found a way to bulk purge yet. Would be nice if there was a wild card to do it.

Use an MQTT client like MQTT Explorer. You still have to do it one topic at a time but the task is reduced to simply clicking an icon.

I can do it one topic at a time. Just wish there was a bulk way.
:slightly_smiling_face:

There is a bulk way by publishing to the group topic instead of each device

2 Likes

Thanks @DavidFW1960

What is a “group topic”?

I haven’t seen that term used outside of Tasmota.

Probably. I only use Tasmota.