# Completely remove Node-RED

**URL:** <https://discourse.nodered.org/t/completely-remove-node-red/19821>\
**Category:** General\
**Created:** [2 January 2020 13:51 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821 "2020-01-02T13:51:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![npburns224](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/npburns224/32/24737_2.png) [@npburns224](https://discourse.nodered.org/u/npburns224)\
**Post date:** [2 January 2020 13:51 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821/1 "2020-01-02T13:51:10Z")

</div>

I installed Node-RED using this install script and am now looking to remove it from my system:

`bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)`  
  
How would I go about undoing everything the script did? I just got through spending several days working on my Pi setup and I'd currently like nothing more than to clean it back up until I'm ready to give this whole thing another try in the future. Thanks in advance!

---

<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:** [2 January 2020 13:54 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821/2 "2020-01-02T13:54:19Z")

</div>

By far the easiest way to get a clean Pi is to re-install your SD-Card.

Otherwise, you can do the following:

```auto
sudo npm remove -g node-red node-red-admin
rm -R ~/.node-red

```

You will need to hunt down the systemd startup script and delete that as well.

You could also remove node.js if you really want to though there doesn't really seem much point.

---

<div class="post-metadata">

**Author:** ![npburns224](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/npburns224/32/24737_2.png) [@npburns224](https://discourse.nodered.org/u/npburns224)\
**Post date:** [2 January 2020 13:59 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821/3 "2020-01-02T13:59:38Z")

</div>

> [@TotallyInformation](#):
>
> sudo npm remove -g node-red node-red-admin

Thanks for the quick reply!  
I've run each of these commands and removed the systemd startup script, however I can still issue the `node-red-start` and `node-red-stop` commands, albeit with errors. Any idea what's lingering around that'd still allow them to function?

---

<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:** [2 January 2020 14:01 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821/4 "2020-01-02T14:01:47Z")

</div>

If you ran Dave's script to install, the best thing to do will be to work backwards through the script so that you see what to uninstall. I don't use the script so I'd forgotten about the start and stop commands, they need removing too of course. 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 January 2020 15:23 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821/5 "2020-01-02T15:23:55Z")

</div>

The command  
`which node-red-start`  
will tell you where they are so you can delete them. Not sure of the point of all this however. Why does it matter? Especially if you are going to try again at some point.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 January 2020 15:33 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821/6 "2020-01-02T15:33:04Z")

</div>

we add those helper scripts into `/usr/bin` - go in there and delete anything `node-red*`  
You can also check `/usr/lib/node_modules` - may be some remnants in there - If you aren't using any other nodejs app you can safely delete them as well.

If you have run it - there will also be your own `~/.node-red` directory which contains any flows you have created so far. - Up to you if you want to delete them or leave them for next time.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [27 June 2020 17:04 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821/7 "2020-06-27T17:04:10Z")

</div>

I ran the following to test uninstall of node-red:

```auto
# node-red-stop
# systemctl stop nodered
# systemctl disable nodered
# npm -g remove node-red
# npm -g remove node-red-admin
# apt remove nodejs (Not used by any other solution)
# rm -rf ~/.node-red (For user node-red was under)

```

Then I did...

```auto
# find / | grep nodered
/etc/logrotate.d/nodered
/lib/systemd/system/nodered.service
/var/log/nodered-install.log

# rm -rf /etc/logrotate.d/nodered
# rm -rf /lib/systemd/system/nodered.service
# rm -rf /var/log/nodered-install.log

```

But I find references to...

```auto
# npm uninstall ...

```

Is there a difference?

Also, looks like neither npm uninstall or npm -g remove clean up the scripts in the /usr/bin directory, or some of the svg files.

```auto
# find / | grep node-red
/usr/bin/node-red-log
/usr/bin/node-red-restart
/usr/bin/node-red-stop
/usr/bin/node-red-reload
/usr/bin/node-red-start
/usr/share/icons/hicolor/scalable/apps/node-red-icon.svg

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 July 2020 17:09 UTC](https://discourse.nodered.org/t/completely-remove-node-red/19821/8 "2020-07-11T17:09:26Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
