How to update n8n via CLI when a new version is released?

I am a newbie in n8n.

Suppose I have installed n8n v 0.70.0 via CLI on my Debian:

npm install n8n -g

After a while a new version 0.71.0 is released.

The questions are:

  1. How to update n8n to the 0.71.0 release via CLI?
  2. Will not it destroy my created workflows?
1 Like

Welcome to the community @James-Frost!

To your questions:

Updating to the latest version is possible with:

npm update -g  n8n

It will not destroy your existing workflows as they are saved separately in your user-folder under .n8n.

3 Likes

Thanks a lot for answer, @jan!

Can you explain in simple words why several releases have different names and number of versions?

Does the command npm update -g n8n updates n8n instance to only [email protected]‘digits’ release or to [email protected]‘digits’ releases too?

Current release is [email protected]
I installed it.
Suppose you create new release: [email protected]
I update n8n via command npm update -g n8n
What will happen?

The version of n8n will set to 0.34.0?

n8n consists of multiple modules (like n8n-nodes-base, n8n-workflow, …) but you do not have to care about those. For you only the n8n module is important which contains all the other ones.

Thanks a lot for explanation, @jan!