# How to delete all retained messages from MQTT subtopic?

**URL:** <https://discourse.nodered.org/t/how-to-delete-all-retained-messages-from-mqtt-subtopic/23200>\
**Category:** General\
**Created:** [16 March 2020 20:32 UTC](https://discourse.nodered.org/t/how-to-delete-all-retained-messages-from-mqtt-subtopic/23200 "2020-03-16T20:32:05Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![techraf](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/techraf/32/17389_2.png) [@techraf](https://discourse.nodered.org/u/techraf)\
**Post date:** [17 March 2020 10:29 UTC](https://discourse.nodered.org/t/how-to-delete-all-retained-messages-from-mqtt-subtopic/23200/7 "2020-03-17T10:29:12Z")

</div>

> [@knolleary](#):
>
> And as you've said, there's no way to trigger a resubscribe with the MQTT nodes.

~~Well, I said that, because I did not get an answer under the other topic, but now, I was actually able to force MQTT nodes to reconnect with `_unsubscribe` message.~~

~~Although not reliably enough yet, i.e. sometimes MQTT nodes enter the `disconnect` state permanently, sometimes they do reconnect.~~

~~I'm doing this by trial and error.~~

~~And after I force a reconnect, I can get retained MQTT messages into a Node-RED flow, even on request with the [digitaloak-mqtt](https://flows.nodered.org/node/node-red-contrib-digitaloak-mqtt) node.~~

It worked as described above, but it seems it was a combination of misconfiguration and a bug. Started [another topic](https://discourse.nodered.org/t/publishing-to-a-wildcard-mqtt-topic-disconnects-all-mqtt-nodes/23244) specifically about that behaviour.

---

_[View the full topic](https://discourse.nodered.org/t/how-to-delete-all-retained-messages-from-mqtt-subtopic/23200)._
