How to uninstall Node-Red?

I wanted to check out Node-Red so I installed it via openhabian-config but now there is no way to uninstall it from openhabian-config. What is the proper uninstall procedure? Thanks!

To delete

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

There are 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.


That worked! Thanks.

humm. Looks like http://openhab:8080/start/index still has a link to Node-Red and clicking the link which points to http://openhab:1880 still serves up a page (although broken and mostly empty) and not a 404.

Anyone have any idea where that start page configuration is?

The command

which node-red-start

This will tell you where you can delete it. Most likely in /lib/systemd/system delete with the next command.

rm -rf /lib/systemd/system/nodered.service

There may always be something left on the raspberry.

Here is the solution that worked for me. Thanks to everyone to helped figure this out. :slight_smile:

Stop, uninstall and remove the systemd file

sudo /usr/bin/node-red-stop
sudo npm remove -g node-red node-red-admin
sudo rm /lib/systemd/system/nodered.service

Remove the panel from the dashboard.config
Delete the three lines prefixed with node-red

nano /var/lib/openhab2/config/org/openhab/dashboard.config

Restart OpenHAB

sudo /bin/systemctl stop openhab2.service
sudo openhab-cli clean-cache (not sure if this is necessary)
sudo /bin/systemctl stop openhab2.service

NOTE: My understanding is editing $OPENHAB_CONF/services/dashboard.cfg has absolutely no effect on the dashboard, except the FIRST time you boot. Just like $OPENHAB_CONF/services/addons.cfg which actually has a comment at the top stating this.