# Is there a universal update script/command?

**URL:** <https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985>\
**Category:** General\
**Created:** [29 January 2021 06:59 UTC](https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985 "2021-01-29T06:59:43Z")\
**Posts on this page:** 7\
**Page:** 1

<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:** [29 January 2021 06:59 UTC](https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985/1 "2021-01-29T06:59:44Z")

</div>

If I want to update NR on my RasPi, I use this command:

`bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)`

and it works.

But it doesn't work for Ubuntu. Fair enough.

But it begs the question - for me - is there one (note: ONE) command?

I've seen posts but it is a heap of commands entered one after the other.  
Which seems strange if it is done for the RasPi, there isn't one for Ubuntu.

Oh, the commands I see are also (I believe) dated as they point to old versions.  
Or it is implied it is for older versions, so those commands are really specific for that version and can't be used for subsequent updates.

---

<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 January 2021 07:17 UTC](https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985/2 "2021-01-29T07:17:55Z")

</div>

> [@Trying\_to\_learn](#):
>
> But it doesn't work for Ubuntu

It does work for me on Ubuntu. If it doesn't for you then report it here so it can be fixed.

---

<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:** [29 January 2021 07:23 UTC](https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985/3 "2021-01-29T07:23:00Z")

</div>

Ok. Thanks.

Just for the sake of it:

This is what I get when I do it.

```auto
me@me-desktop:~$ cd .node-red
me@me-desktop:~/.node-red$ bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
 
**************************************************************************************************
The command that got you this script has been updated.
Please use the following version:
 
   bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
 
See https://github.com/node-red/linux-installers for details.
Thank you.
**************************************************************************************************
[sudo] password for me: 
rm: cannot remove '/usr/bin/update-nodejs-and-nodered': No such file or directory
me@me-desktop:~/.node-red$ 

```

(Sorry, I just got back from 2 weeks away and still not up to speed.)  
What is the link I use to submit the problem?

ARGH!

Ok, I'll try the suggested command.

Hang on.

It works. Sorry.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 January 2021 09:07 UTC](https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985/4 "2021-01-29T09:07:33Z")

</div>

That is a very old version of the command - if you check here for the latest - [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

---

<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:** [29 January 2021 12:55 UTC](https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985/5 "2021-01-29T12:55:51Z")

</div>

Every server is different and many requirements are different so there can never be "one script to rule them all".

In any case, installing Node-RED is just `npm install -g node-red --production --unsafe-perm`. Everything else is about dependencies which may already be present anyway.

That command works on EVERY platform that supports Node-RED. As long as Node.js is installed in a standard way.

One of the reasons for Dave's script was that Rasbian **did not** have a standard Node.js installation for some time - I actually don't know if it does even today since I always use the Node.js recommended library.

---

<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:** [29 January 2021 22:35 UTC](https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985/6 "2021-01-29T22:35:13Z")

</div>

> [@TotallyInformation](#):
>
> `npm install -g node-red --production --unsafe-perm`

I have that in my list (but not at the top) and prefixed with `sudo`

Thanks.

I shall get things up to date asap.

---

<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:** [30 March 2021 22:35 UTC](https://discourse.nodered.org/t/is-there-a-universal-update-script-command/39985/7 "2021-03-30T22:35:54Z")

</div>

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