Completely remove Node-RED

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

bash <(curl -sL

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!

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

Otherwise, you can do the following:

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.

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?

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. :slight_smile:

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.

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.

1 Like

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

# 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...

# find / | grep nodered

# 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...

# 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.

# find / | grep node-red

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