# Prevent auto reinstall of removed nodes

**URL:** <https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171>\
**Category:** General\
**Created:** [29 June 2020 14:23 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171 "2020-06-29T14:23:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![grisson2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grisson2/32/8611_2.png) [@grisson2](https://discourse.nodered.org/u/grisson2)\
**Post date:** [29 June 2020 14:23 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171/1 "2020-06-29T14:23:49Z")

</div>

Some time ago i installed the telegram bot package (using palette manager) just to play with it in spare time, then removed it since it wasn't needed anymore (using npm uninstall)

I'm unable to definitely take rid of it since nodered keep reinstalling it every time i remove it and reboot nodered, it's like it's haunting me.

Is there a way to just uninstall with npm and make nodered forget 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:** [29 June 2020 14:42 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171/2 "2020-06-29T14:42:32Z")

</div>

Node red can't automatically install a node, as far as I know.  
Show us the terminal log from the uninstall. Make sure you are in the .node-red folder when you do it.

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [29 June 2020 14:48 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171/3 "2020-06-29T14:48:23Z")

</div>

is it still in the package.json in your user directory (e.g. ~/.node-red) or in the package-lock.json?

---

<div class="post-metadata">

**Author:** ![grisson2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grisson2/32/8611_2.png) [@grisson2](https://discourse.nodered.org/u/grisson2)\
**Post date:** [29 June 2020 15:46 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171/4 "2020-06-29T15:46:46Z")

</div>

Next time i have the log i will show you but:

- i'm not in the .node-red folder since nodered is mounted as dependency of my app. and configuration is passed programmatically
- no files are saved on disk at all, since i've implemented a storage plugin to route all the data over a mongodb collection
- the package is not listed in package.json nor package-lock.json after npm uninstall

However i'm noticing that if the package is still listed into the json defined in (the former file who is on db in my project) ".config.json" but effectively not installed, something like "npm install thatPackage" occur under the hood.

It's just that operation that i want to prevent WITHOUT effectively touching the db.  
Another question pops up now while i'm writing: in the standard nodered deploy, an npm uninstall act also on this file to remove references to nodes?

---

<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:** [29 June 2020 15:55 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171/5 "2020-06-29T15:55:39Z")

</div>

It sounds like you have the `autoInstallModules` option set. This is the option that causes Node-RED to automatically reinstall anything listed in .config.json that it doesn't find installed.

You have two options:

1. uninstall the module using the Palette Manager in the editor (or using `node-red-admin`) - basically, get Node-RED to uninstall it, so it updates .config.json for you

2. without NR running, hand-edit .config.json to remove the entry for the node.

---

<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:** [29 June 2020 16:42 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171/6 "2020-06-29T16:42:35Z")

</div>

> [@knolleary](#):
>
> autoInstallModules

Where is that option?

---

<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:** [29 June 2020 16:43 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171/7 "2020-06-29T16:43:48Z")

</div>

It is an undocumented option that doesn't appear in the default settings file.

---

<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:** [28 August 2020 16:43 UTC](https://discourse.nodered.org/t/prevent-auto-reinstall-of-removed-nodes/29171/8 "2020-08-28T16:43:48Z")

</div>

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