# Before re-deploy i want to clear global variable

**URL:** https://discourse.nodered.org/t/before-re-deploy-i-want-to-clear-global-variable/20247
**Category:** General
**Created:** [13 January 2020 06:21 UTC](https://discourse.nodered.org/t/before-re-deploy-i-want-to-clear-global-variable/20247 "2020-01-13T06:21:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kiran](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kiran/32/27855_2.png) [@kiran](https://discourse.nodered.org/u/kiran)
#### Post date: [13 January 2020 06:21 UTC](https://discourse.nodered.org/t/before-re-deploy-i-want-to-clear-global-variable/20247/1 "2020-01-13T06:21:44Z")

</div>

Before re-deploy i want to clear global variable content how to do that ?

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [13 January 2020 07:50 UTC](https://discourse.nodered.org/t/before-re-deploy-i-want-to-clear-global-variable/20247/2 "2020-01-13T07:50:44Z")

</div>

You can delete it _manually_ in the Context side-bar or by using an Inject and Change node.

However, there are no runtime events available to trigger a flow automatically.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [13 January 2020 10:20 UTC](https://discourse.nodered.org/t/before-re-deploy-i-want-to-clear-global-variable/20247/3 "2020-01-13T10:20:30Z")

</div>

Make sure that you do a full deploy, that clears all in-memory variables I think.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/9/3949bc83f3585ca358798b15777315956bbad132.png)

---

<div class="post-metadata">

### Author: ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)
#### Post date: [13 January 2020 15:49 UTC](https://discourse.nodered.org/t/before-re-deploy-i-want-to-clear-global-variable/20247/4 "2020-01-13T15:49:16Z")

</div>

I believe you can also use JS in a `function` node:

> global.set('variableName',undefined);
