# Updating from NR v0.20.5 to latest version in a Pi: Anything to worry about?

**URL:** <https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491>\
**Category:** General\
**Created:** [20 December 2021 17:08 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491 "2021-12-20T17:08:58Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaptClaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/captclaude/32/2125_2.png) [@CaptClaude](https://discourse.nodered.org/u/CaptClaude)\
**Post date:** [20 December 2021 17:08 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/1 "2021-12-20T17:08:59Z")

</div>

I have had a very stable and happy experience with NR v0.20.5 for the past very long while but figure it's time to upgrade because, well... because.  
This is where I stand:

> 20 Dec 10:50:28 - [info] Node-RED version: v0.20.5  
> 20 Dec 10:50:28 - [info] Node.js version: v10.24.1  
> 20 Dec 10:50:28 - [info] Linux 4.19.66-v7+ arm LE

Is running the install/update Bash script the way to go? Is there anything _obvious_ that might break?  
Are there any precautions I should take first?  
Of course I will backup my flows and so on, but I'd prefer to avoid nasty surprises.

Thanks!

--Jeff

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 December 2021 17:12 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/2 "2021-12-20T17:12:08Z")

</div>

Backup your userDir folder except for the `node_modules` folder. Then it is easy to go back if you need to.

THe script should work but you should do `sudo apt update && sudo apt upgrade` first to make sure everything else is up to date.

---

<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:** [20 December 2021 17:56 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/3 "2021-12-20T17:56:15Z")

</div>

Which version of Raspbian are you using, there may be issues with old versions.

---

<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:** [20 December 2021 17:57 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/4 "2021-12-20T17:57:16Z")

</div>

> [@TotallyInformation](#):
>
> sudo apt upgrade

That should be  
`sudo apt full-upgrade`

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 December 2021 18:22 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/5 "2021-12-20T18:22:27Z")

</div>

> [@Colin](#):
>
> apt full-upgrade

Not really, `apt upgrade` is the safer option. `full-upgrade` may auto-remove some packages that you might wish to retain.

---

<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:** [20 December 2021 21:30 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/6 "2021-12-20T21:30:22Z")

</div>

`full-upgrade` will not remove any packages without asking if it is ok (assuming you have not specified `-y` in the command). It will only want to remove a package if it is necessary to remove it in order to upgrade a package, so the danger in using just `upgrade` is that it will leave one or more packages not upgraded.  
In practice I think that the likelihood of it wanting to remove a package that should not be removed is very small. In more than a dozen years of using Linux this has never happened to me. I think it is not likely to happen unless you have apps that have been self compiled, in which case the app may require a package which `full-upgrade` wants to remove.

Finally, on Ubuntu, if one uses the GUI upgrade system, or configures auto update, then in the background it uses `full-upgrade` without asking about removing packages that need to be removed. I don't know about the Raspbian GUI, but I suspect that it may do the same, assuming that Raspbian has such a tool.

---

<div class="post-metadata">

**Author:** ![CaptClaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/captclaude/32/2125_2.png) [@CaptClaude](https://discourse.nodered.org/u/CaptClaude)\
**Post date:** [6 January 2022 01:48 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/7 "2022-01-06T01:48:44Z")

</div>

It took a while to drum up the courage, but I am now running Bullseye:

```auto
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

```

A user error caused me to upgrade to Buster (from Stretch) before doing it all again to get to Bullseye.  
As near as I can tell, the only thing that broke was `mosquitto` because the the version I was running allowed external connections by default and the newest version doesn't. Two lines in the configuration file later, everything started working again. PiHole didn't miss a beat because I kept several of the PiHole-related config files during the upgrade(s).

Then I ran the script to install NR and after the first failure I specified `--node12` it ran through to completion without error. I was scared to go higher than 12, someone can chime in and tell me whether I should upgrade to 14 or 16.

Now I am 100% up to date! The latest NR looks great.

Thanks for the advice.

--Jeff

---

<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 January 2022 08:16 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/8 "2022-01-06T08:16:58Z")

</div>

The recommended version is 14, but 16 is also supported by the node red core. I run 16. There may be some contrib nodes that still do not support 16, but nothing that I use comes into that category.  
I can see no reason not to use at least 14. It is easy to go back again after an upgrade should there be an issue.

---

<div class="post-metadata">

**Author:** ![CaptClaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/captclaude/32/2125_2.png) [@CaptClaude](https://discourse.nodered.org/u/CaptClaude)\
**Post date:** [11 January 2022 04:07 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/9 "2022-01-11T04:07:37Z")

</div>

Thanks for the guidance. I will look into upgrading to 14. If you have a pointer to a how-to guide, I'd be happy to see it.

---

<div class="post-metadata">

**Author:** ![nerevar](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@nerevar](https://discourse.nodered.org/u/nerevar)\
**Post date:** [11 January 2022 06:24 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/10 "2022-01-11T06:24:20Z")

</div>

I used this script on buster without any problems:  
`bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node14`

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [11 January 2022 06:41 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/11 "2022-01-11T06:41:01Z")

</div>

Um,

What machine are you using too?

I have just had a recent bad event when updating the O/S on a RasPi.

If it is a ZERO, do **NOT** update to BUSTER. You will not get it working.

---

<div class="post-metadata">

**Author:** ![nerevar](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@nerevar](https://discourse.nodered.org/u/nerevar)\
**Post date:** [11 January 2022 07:02 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/12 "2022-01-11T07:02:51Z")

</div>

Im using RevPi 3+ (industriav version of raspberry 3). This script was used to install the node-red on both linux stretch and buster without any errors.

If you only need to install NodeJS on debian 11 then you perhaps need to take this steps:

> **[Install Node.js 16|14 and npm on Debian 11 - TechViewLeo](https://techviewleo.com/install-nodejs-and-npm-on-debian-linux/)**
>
> Install Node.js 14 on Debian 11 once the system has been updated by first installing the necessary repository:

`sudo apt update`  
`curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -`  
`sudo apt -y install nodejs`  
`node -v`

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [11 January 2022 07:05 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/13 "2022-01-11T07:05:28Z")

</div>

Well I updated the O/S and it did work. (Up two levels)

It took a long time, and I was a bit worried. But it does work.

Sorry.. Yeah, you are only updating Node-Red. All should also be good there.

---

<div class="post-metadata">

**Author:** ![CaptClaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/captclaude/32/2125_2.png) [@CaptClaude](https://discourse.nodered.org/u/CaptClaude)\
**Post date:** [18 January 2022 05:24 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/14 "2022-01-18T05:24:01Z")

</div>

I upgraded everything and it was successful. I too was nervous and yes it took a long time (RPi3B). Now I need to update Node.js. Since there is a maintenance release for NR, I'll update everything (except the OS) again.  
Fingers crossed.  
Thanks.

---

<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 January 2022 07:04 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/15 "2022-01-18T07:04:38Z")

</div>

> [@CaptClaude](#):
>
> Now I need to update Node.js

Since you used the script, then the usual system updates should keep nodejs up to date

```auto
sudo apt update
sudo apt full-upgrade

```

---

<div class="post-metadata">

**Author:** ![CaptClaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/captclaude/32/2125_2.png) [@CaptClaude](https://discourse.nodered.org/u/CaptClaude)\
**Post date:** [22 January 2022 20:32 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/16 "2022-01-22T20:32:05Z")

</div>

Running those two commands upgraded node.js from `v12.22.8` to `v12.22.9`, so it kept my Node 12 up to date but didn't move me to 14.  
Multiple sources on the web all say to do it the way @nerevar suggested, so that's what I did and I am now running v14.18.3.

Now I need to look at upgrading to a RPi4.

Thanks.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [22 January 2022 21:14 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/17 "2022-01-22T21:14:23Z")

</div>

Moving between major versions of node.js requires a change of source. The debian/ubuntu nodesource repo has the details.

[distributions/README.md at master · nodesource/distributions (github.com)](https://github.com/nodesource/distributions/blob/master/README.md)

That is the method that nerevar pointed you to.

---

<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:** [22 January 2022 21:27 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/18 "2022-01-22T21:27:09Z")

</div>

> [@CaptClaude](#):
>
> it kept my Node 12 up to date but didn't move me to 14.

I didn't realise that is what you wanted to do. To do that the easiest way is the run the node-red install script again with --node14 on the end, as suggested earlier.

---

<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:** [23 March 2022 21:27 UTC](https://discourse.nodered.org/t/updating-from-nr-v0-20-5-to-latest-version-in-a-pi-anything-to-worry-about/55491/19 "2022-03-23T21:27:13Z")

</div>

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