# How to uninstall node

**URL:** <https://discourse.nodered.org/t/how-to-uninstall-node/1278>\
**Category:** General\
**Created:** [3 July 2018 15:06 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278 "2018-07-03T15:06:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![malinthasa](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@malinthasa](https://discourse.nodered.org/u/malinthasa)\
**Post date:** [3 July 2018 15:06 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/1 "2018-07-03T15:06:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [3 July 2018 15:55 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/2 "2018-07-03T15:55:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![malinthasa](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@malinthasa](https://discourse.nodered.org/u/malinthasa)\
**Post date:** [3 July 2018 16:03 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/3 "2018-07-03T16:03:33Z")

</div>

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

---

<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:** [3 July 2018 16:51 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/4 "2018-07-03T16:51:14Z")

</div>

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.

---

<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:** [3 July 2018 21:56 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/5 "2018-07-03T21:56:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jimsander](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jimsander](https://discourse.nodered.org/u/jimsander)\
**Post date:** [2 October 2019 22:56 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/6 "2019-10-02T22:56:32Z")

</div>

had a similar issue with the node still showing as installed after `npm .. uninstall` with various options... went into the `.node-red` directory itself and ran it, then ran `npm audit fix`... worked, not sure which was the magic sauce.

---

<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:** [3 October 2019 08:12 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/7 "2019-10-03T08:12:28Z")

</div>

Do you mean that the first time you were not in the .node-red directory? If so then that was the problem. Unless you are installing globally (with `-g`) then installs are local to the folder you run npm in.  
By the way, running `audit fix` is generally not recommended as you can end up with incompatible versions of nodes, which can break things.

---

<div class="post-metadata">

**Author:** ![jimsander](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jimsander](https://discourse.nodered.org/u/jimsander)\
**Post date:** [3 October 2019 12:25 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/8 "2019-10-03T12:25:55Z")

</div>

I'm pretty sure that was the situation (not being in the .node-red directory), though can't be certain, was moving in an out trying to figure why the node-red lib was still showing up as `installed` in the UI. Could very well have been a good old F5/refresh that was the real trick. Either way, thanks for the clarification @Colin; I'm a long time user but novice dev with npm/node.js.

---

<div class="post-metadata">

**Author:** ![akszyn\_pl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/akszyn_pl/32/36504_2.png) [@akszyn\_pl](https://discourse.nodered.org/u/akszyn_pl)\
**Post date:** [13 March 2021 13:44 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/9 "2021-03-13T13:44:12Z")

</div>

how to remove from android [sonoff Ian](https://flows.nodered.org/node/node-red-contrib-sonoff-lan-mode) Because the command `tsudo npm uninstall node-red-contrib-sonoff-lan-mode` Does nothing about .node-red or .node-red/node\_modules

---

<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:** [13 March 2021 14:06 UTC](https://discourse.nodered.org/t/how-to-uninstall-node/1278/10 "2021-03-13T14:06:05Z")

</div>

If the node is installed in .node-red/node\_modules then you need to enter the .node-red folder and run  
`npm uninstall node-red-sonoff-lan-mode`  
Note, no sudo and no -g
