# Trying to remove custom node

**URL:** <https://discourse.nodered.org/t/trying-to-remove-custom-node/41632>\
**Category:** General\
**Created:** [25 February 2021 17:07 UTC](https://discourse.nodered.org/t/trying-to-remove-custom-node/41632 "2021-02-25T17:07:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtaylor](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jtaylor](https://discourse.nodered.org/u/jtaylor)\
**Post date:** [25 February 2021 17:07 UTC](https://discourse.nodered.org/t/trying-to-remove-custom-node/41632/1 "2021-02-25T17:07:46Z")

</div>

I installed a custom node ([node-red-contrib-db2-for-i (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-db2-for-i)). I need to remove it because it has a SQL injection vulnerability and I have to make sure it's not used. I run the uninstall, restart Node-RED, but the node still appears in the pallet. What am I doing wrong?

TIA

```auto
-bash-4.4$ cd ~/.node-red
-bash-4.4$ npm uninstall node-red-contrib-db2-for-i
audited 2 packages in 0.474s
found 0 vulnerabilities

```

---

<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:** [25 February 2021 17:17 UTC](https://discourse.nodered.org/t/trying-to-remove-custom-node/41632/2 "2021-02-25T17:17:37Z")

</div>

where is this running? Is it on the IBM Cloud instance or a local device?

Assuming this is on a server you have access to and not an IBM Cloud instance, then you could have a look in `~/.node-red/.config.nodes.json` - this will include a list of all nodes the runtime has loaded and where it has loaded them from. That should give you an idea as to where the db2 nodes are installed and where they need to be uninstalled from.

---

<div class="post-metadata">

**Author:** ![jtaylor](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jtaylor](https://discourse.nodered.org/u/jtaylor)\
**Post date:** [25 February 2021 18:43 UTC](https://discourse.nodered.org/t/trying-to-remove-custom-node/41632/3 "2021-02-25T18:43:51Z")

</div>

It's on a local server. `~/.node-red/.config.nodes.json` shows `~/node-red/node_modules/node-red-contrib-db2-for-i/ibmdb2fori.js`. I tried the uninstall from ~/node-red, but the node still appears.

---

<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:** [25 February 2021 21:18 UTC](https://discourse.nodered.org/t/trying-to-remove-custom-node/41632/4 "2021-02-25T21:18:45Z")

</div>

Make a copy of package.json then remove that node from package.json and delete the link in .node-red/node\_modules.  
If it doesn't appear in package.json then come back.

---

<div class="post-metadata">

**Author:** ![jtaylor](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jtaylor](https://discourse.nodered.org/u/jtaylor)\
**Post date:** [25 February 2021 22:16 UTC](https://discourse.nodered.org/t/trying-to-remove-custom-node/41632/5 "2021-02-25T22:16:13Z")

</div>

Yuk! I've made quite a mess here. I accidentally installed some custom nodes to ~/node-red/ instead of ~/.node-red/. I'm going to save off my work, scratch both directories, and start over clean.

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 April 2021 22:16 UTC](https://discourse.nodered.org/t/trying-to-remove-custom-node/41632/6 "2021-04-26T22:16:46Z")

</div>

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