# Need help with upgrade from 3.0.2 to latest in Debian

**URL:** <https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409>\
**Category:** General\
**Created:** [15 October 2024 13:00 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409 "2024-10-15T13:00:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [15 October 2024 13:00 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/1 "2024-10-15T13:00:33Z")

</div>

Want to upgrade Node-Red from 3.0.2 to latest. I'm running Debian. Terrified as I have zero clue. Help please. Tried according to the ND website and get the following message! No idea what that means!

```auto
Running Node-RED install for user ola_a at /home/ola_a on debian

[sudo] password for ola_a: 
Node-RED v3.x no longer supports Nodejs 16 
  
  You can force an install of node 18 or 20 by adding --node18 or --node20 to the end of the command line above.
  However doing so may break some nodes that may need re-installing manually.
  Generally it is recommended to update all nodes to their latest versions before upgrading.
  
  If you wish to stay on nodejs 16 you can update to the latest Node-RED 1.x or 2.x version by adding
  --nodered-version="1.3.7" or --nodered-version="2.2.2" to that install command. If in doubt this is the safer option.
  Please backup your installation and flows before upgrading.
  
  Note: not all embedded hardware can be updated via this method - please check before proceeding.
  
  Exiting now.

```

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [15 October 2024 13:30 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/2 "2024-10-15T13:30:58Z")

</div>

OK 🙂  
I asked Chatgpt and got great help with the upgrade.  
It urged me to make a backup, which I did. Of course, when it comes to Linux and updates, nothing works really well! Completely Empty ND !!!

Restore from the file and is now up and running 🙂

---

<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:** [15 October 2024 14:13 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/3 "2024-10-15T14:13:37Z")

</div>

> [@Olaa](#):
>
> I asked Chatgpt and got great help with the upgrade.

Did you run the script with --node20 on the end or did you do something else?

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [18 October 2024 12:45 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/4 "2024-10-18T12:45:22Z")

</div>

> [@Colin](#):
>
> script with --node20

Here is the link for Chatgpt:

> **[how can I in Debian upgrade node-red from 3.0.2 to 4.0](https://poe.com/s/6Yz5RBPGjA2vQE5YyzpU)**
>
> GPT-3.5-Turbo: To upgrade Node-RED on Debian from version 3.0.2 to version 4.0, you can follow these steps:
> 
> 1. \*\*Backup your flows\*\*: Before upgrading, it's always a good idea to backup your Node-RED

> **[how update Update Node.js in Debian](https://poe.com/s/9wP9tBGrc52CdMA74Ywk)**
>
> GPT-3.5-Turbo: To update Node.js on Debian, you can follow these general steps:
> 
> 1. \*\*Check the current version\*\*: First, you should check the current version of Node.js installed on your system. You

After the upgrade I checked the version and now NR is 4.0.5 and everything vorks nice 🙂

---

<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:** [18 October 2024 13:46 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/5 "2024-10-18T13:46:27Z")

</div>

Did you install nodejs using `nvm`? That is a bad idea, you will have problems at some point. You would have been better to use the recommended upgrade script.

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [19 October 2024 09:41 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/6 "2024-10-19T09:41:56Z")

</div>

OK I have problems now ☹ Where could I find the update script?  
I have v18.20.4 but when install it says that I have v16.20.2  
What should I do?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 October 2024 09:45 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/7 "2024-10-19T09:45:45Z")

</div>

> [@Olaa](#):
>
> Where could I find the update script?

For ubuntu/debian based systems: [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

> [@Olaa](#):
>
> I have v18.20.4 but when install it says that I have v16.20.2

Sounds like you have installed `nvm` or `n` - best to remove this.

Try running the script with `--node18` appended e.g

```auto
the_script_as_detailed_in_the_link --node18

```

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [19 October 2024 09:46 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/8 "2024-10-19T09:46:40Z")

</div>

I tried the script for upgrade "

```auto
sudo npm install -g --unsafe-perm node-red

```

But I still get the npm warning see picture.

 ![0066](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/ca5e53927287e0a63a9f2d3ea0ee3736ec623d54.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 October 2024 09:48 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/9 "2024-10-19T09:48:35Z")

</div>

What you ran was `npm install`. That is not the "update script" we are talking about. See my post above.

Also, please confirm if you are using `nvm` or `n` or some other node version manager.

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [19 October 2024 09:55 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/10 "2024-10-19T09:55:39Z")

</div>

Sorry I made a mistake. Now I tried your link and it looks very different and I don't get any errors so far. I try to start and then I get the same error as before se picture.

 ![0067](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/e/8e5aed2ba906586d7311a247a86243c70355cd2b.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 October 2024 09:58 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/11 "2024-10-19T09:58:21Z")

</div>

> [@Olaa](#):
>
> I try to start and then I get the same error as before se picture.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f24eb5e53a9de1e2f62b54cff6b5445ca584260a.png)

> [@Steve-Mcl](#):
>
> Also, please confirm if you are using `nvm` or `n` or some other node version manager.

> [@Steve-Mcl](#):
>
> Sounds like you have installed `nvm` or `n` - best to remove this.

> [@Colin](#):
>
> Did you install nodejs using `nvm`? That is a bad idea

Not sure if we can make this any clearer?

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [19 October 2024 10:01 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/12 "2024-10-19T10:01:58Z")

</div>

Yes it seems that I used NVM.

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [19 October 2024 10:04 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/13 "2024-10-19T10:04:38Z")

</div>

How to remove nvm?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 October 2024 10:08 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/14 "2024-10-19T10:08:12Z")

</div>

> [@Olaa](#):
>
> How to remove nvm

Like [this](https://github.com/nvm-sh/nvm/issues/298)

Or [this](https://gprivate.com/6dtbv) 😉

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [19 October 2024 10:18 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/15 "2024-10-19T10:18:45Z")

</div>

Sorry but I don't find anything of this files. I tried source ~/.bashrc

i don't know what I'm doing. My NR have been upp 2 years now without any problems. I remember it was big problems to install it in the beginning ☹

I'm really appreciates your help.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 October 2024 10:23 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/16 "2024-10-19T10:23:25Z")

</div>

1. what do you see if you enter `which nvm`
2. what do you see if you enter `echo $NVM_DIR`

> [@Olaa](#):
>
> . I remember it was big problems to install it in the beginning

Not if you used the script and avoid NVM. It really is that simple.

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [19 October 2024 10:28 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/17 "2024-10-19T10:28:31Z")

</div>

> [@Steve-Mcl](#):
>
> which nvm

I tried to install again and now it looks different. I et back to you son...

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [19 October 2024 10:40 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/18 "2024-10-19T10:40:30Z")

</div>

Now it's looking better. Yes I'm up and going 🙂 And all nodes are there phuuuu.  
I'm so happy now an again thank you very much for all the help and for putting up with me and my ignorance.

 ![0071](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/a/3a93a7edb2873d9466a4b5725bde2fe178d9194b.jpeg)

 ![0069](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/2/b24e51e1bed859f63a7072a2364d4a1da6272f7e.jpeg)

 ![0068](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/3/e3436868db56abfd019bea1fa0d417e5fed47e0d.jpeg)

---

<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:** [19 October 2024 15:10 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/19 "2024-10-19T15:10:24Z")

</div>

> [@Olaa](#):
>
> all nodes are there phuuuu

By this do you mean that you have not got a backup of the flows?

You should backup everything in your .node-red folder except the node\_modules folder.

If you ever have to recover from a disaster then restore that folder, go into it and run  
`npm install`  
which will restore all the extra nodes required.

---

<div class="post-metadata">

**Author:** ![Olaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/olaa/32/73030_2.png) [@Olaa](https://discourse.nodered.org/u/Olaa)\
**Post date:** [20 October 2024 13:26 UTC](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409/20 "2024-10-20T13:26:17Z")

</div>

No I have backup of everything but I don't like to work to much, and in the computer world not everything goes as i should even restore get me into to much work sometimes.

Anyway really thanks for all help and concern 🙂

[Next page](https://discourse.nodered.org/t/need-help-with-upgrade-from-3-0-2-to-latest-in-debian/92409.md?page=2)
