How to uninstall node

#1

I installed my node and need to uninstall it. I executed following and restarted node-red.

sudo npm -g uninstall {path_to_node_source}

But the palet still has that node. How to uninstall a node properly.?

I user Ctrl+C to terminate node-red. Will that be the issue?

0 Likes

#2

Are you sure you intalled using the -g?
do a cd .node-red/node_modules and see if the node it there. If it is do
cd .. and sudo npm uninstall node-red-whatever-the-node-is which will remove the node.

0 Likes

#3

I didn’t install it with -g. and sudo npm uninstall node-red-whatever-the-node-is didn’t work. I removed it from /node_modules folder and its not longer there. But I am afaraind that manually deleting the folder is not the correct way to do it. ?

0 Likes

#4

If you didn’t install with -g you shouldn’t try to uninstall with -g. Also never use sudo to install or uninstall a non-global node (ie not -g) or you will mess up your file permissions which may give problems later.

0 Likes

#5

just deleting the folder may not be the correct way to remove it as it may not remove sub-dependencies - but it works - so meh… don’t over worry about it.

0 Likes