# Uninstall custom node

**URL:** <https://discourse.nodered.org/t/uninstall-custom-node/4605>\
**Category:** General\
**Created:** [6 November 2018 11:50 UTC](https://discourse.nodered.org/t/uninstall-custom-node/4605 "2018-11-06T11:50:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel-delira](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@gabriel-delira](https://discourse.nodered.org/u/gabriel-delira)\
**Post date:** [6 November 2018 11:50 UTC](https://discourse.nodered.org/t/uninstall-custom-node/4605/1 "2018-11-06T11:50:21Z")

</div>

Hi, i've created some customs nodes and linked with my local node-red server using:

sudo npm link my-custom-node

But now I want to remove 1 of them from my modules. I tried use

sudo npm uninstall my-custom-node-to-remove  
And  
sudo npm remove my-custom-node-to-remove

But that deleted all the nodes I've created. There is a way to do what I want?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [6 November 2018 12:22 UTC](https://discourse.nodered.org/t/uninstall-custom-node/4605/2 "2018-11-06T12:22:41Z")

</div>

I'm not clear what you mean.

Do you have:

1. one module that contains lots of nodes and you want to remove one of them from the module.
2. or, lots of modules, each of which you've used `npm link` to install and you want to remove one of those modules?

What version of npm are you using?

---

<div class="post-metadata">

**Author:** ![gabriel-delira](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@gabriel-delira](https://discourse.nodered.org/u/gabriel-delira)\
**Post date:** [6 November 2018 13:08 UTC](https://discourse.nodered.org/t/uninstall-custom-node/4605/3 "2018-11-06T13:08:12Z")

</div>

Npm Version: 6.4.1

I'm newbie, so if understand correctly I've done the 2 option ("lots of modules, each of which you've used `npm link` to install and you want to remove one of those").  
To better explain, I've followed the creting node tutorial, so I've created some folders each one having 3 files:

- One .html
- One .json
- One .js

After that I've used npm link for each of these. But now, I want to remove just one of them.

---

<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:** [6 November 2018 13:20 UTC](https://discourse.nodered.org/t/uninstall-custom-node/4605/4 "2018-11-06T13:20:00Z")

</div>

Could this be caused by the fact that recent versions of npm may without warning remove nodes that are not included in package.json? So the npm remove command is removing one node, but then npm is removing the rest because they have not been included in the package?

---

<div class="post-metadata">

**Author:** ![gabriel-delira](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@gabriel-delira](https://discourse.nodered.org/u/gabriel-delira)\
**Post date:** [6 November 2018 17:11 UTC](https://discourse.nodered.org/t/uninstall-custom-node/4605/5 "2018-11-06T17:11:37Z")

</div>

Thanks guys, the problem was as Colin said. When I manually include the dependency on package.json, the remove works perfectly.

---

<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:** [6 November 2018 20:30 UTC](https://discourse.nodered.org/t/uninstall-custom-node/4605/6 "2018-11-06T20:30:09Z")

</div>

It seems like a possible deficiency in npm that it does not update package.json when you use link.
