# At the end of my wits.....Ghost flows!

**URL:** <https://discourse.nodered.org/t/at-the-end-of-my-wits-ghost-flows/7008>\
**Category:** General\
**Created:** [19 January 2019 09:37 UTC](https://discourse.nodered.org/t/at-the-end-of-my-wits-ghost-flows/7008 "2019-01-19T09:37:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sander](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sander/32/5285_2.png) [@Sander](https://discourse.nodered.org/u/Sander)\
**Post date:** [19 January 2019 09:37 UTC](https://discourse.nodered.org/t/at-the-end-of-my-wits-ghost-flows/7008/1 "2019-01-19T09:37:00Z")

</div>

Hello all,

I am a relative novice when it comes to node-red (and MQTT and messaging in general for that matter). After playing around a bit, like creating and then deleting flows, I am experiencing what I've learned to describe as 'Ghost Flows'. Despite having tried all suggestions, I still keep receiving messages from old and removed flows. I tried:

- Rebooting
- Stopping node-red and deleting the 'flows\_raspberrypi.json' file and restarting
- Upgrading using npm, including purging the cache
- Upgrading using the script, deleting the flows\_raspberrypi.json file before starting
- Exporting all flows to clipboard through the UI and verifying the code to see if it popped up there, but this is all I get ([{"id":"1df0fe65.6b9752","type":"tab","label":"Flow 1","disabled":false,"info":""}])

My versions:  
Node-RED version: v0.19.5  
Node.js version: v10.15.0

These messages appear one time only, and that's when subscribing using mosquitto\_sub. So they look like birth-messages, but there's no configuration node. They have an obious similarity: I mistakenly set the topic to contain a leading forward-slash (e.g. '/bedroom/lights').

What am I missing? I would greatly appreciate any suggestion!

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 January 2019 09:47 UTC](https://discourse.nodered.org/t/at-the-end-of-my-wits-ghost-flows/7008/2 "2019-01-19T09:47:52Z")

</div>

It sounds like you have a retained message stored on the broker that is published whenever you subscribe.

If you search for how to clear a retained message, you should be able to get rid of it with the right use of mosquitto\_pub

---

<div class="post-metadata">

**Author:** ![Sander](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sander/32/5285_2.png) [@Sander](https://discourse.nodered.org/u/Sander)\
**Post date:** [19 January 2019 15:29 UTC](https://discourse.nodered.org/t/at-the-end-of-my-wits-ghost-flows/7008/3 "2019-01-19T15:29:54Z")

</div>

Thank you so much for your quick expert advice. I googled and found Steve Cope's excellent Python tool which did the trick! Awesome!
