Initialize Node-Red

I'm relatively new to using Node-Red.
I've been able to create several flows, but this is not like any development environment I've ever worked with.
When Node-Red opens in a browser the old flow is present; I've already exported the old flows and would like to create a completely new set of flows. How, can the old flows be completely cleared from the editor?

Thanks

Hi @xytsrm you can double click on the flow tab and disable on delete flow or simply hide it.

workspace - Flows

if you hover over the tab, you have the option to hide.

Screenshot from 2023-03-06 18-17-54

Where are you exporting a flow where it still works? Typically deleting a flow means that it's gone and won't run. I'm confused.

I've tried deleting the tabs, but the flows remain in a list on the right; if you click one of those flows the tab reappears. I would like to reinitialize the development environment as it was when originally installed.

rename the flows.json to some thing else (rather than delete if you want to use it again ever) in the NR folder and restart node-red

stephenn, when you export you create a complete copy as a JSON file that can be re-imported anytime.

smanjunath211, where is the flows.json stored?

you can find it in the startup info on the console

7 Mar 00:15:50 - [info] 

Welcome to Node-RED
===================

7 Mar 00:15:50 - [info] Node-RED version: v3.0.0
7 Mar 00:15:50 - [info] Node.js  version: v16.16.0
7 Mar 00:15:50 - [info] Windows_NT 10.0.19044 x64 LE
7 Mar 00:15:52 - [info] Loading palette nodes
7 Mar 00:16:00 - [info] Dashboard version 3.3.1 started at /ui
7 Mar 00:16:01 - [info] Settings file  : c:\Users\OEEHo\.node-red2\settings.js
7 Mar 00:16:01 - [info] Context store  : 'memoryOnly' [module=memory]
7 Mar 00:16:01 - [info] Context store  : 'file' [module=localfilesystem]
7 Mar 00:16:01 - [info] User directory : c:\Users\OEEHo\.node-red2
7 Mar 00:16:01 - [warn] Projects disabled : editorTheme.projects.enabled=false
7 Mar 00:16:01 - [info] Flows file     : c:\Users\OEEHo\.node-red2\flows.json
7 Mar 00:16:01 - [info] Server now running at http://127.0.0.1:1881/
7 Mar 00:16:02 - [warn] 

Thanks, I think I've already found it, but I wanted to make sure that was the correct file.

In that case you had just hidden it, not deleted it. @MecatronicaMADE indicted how to delete it.

1 Like

Yeah Colin, I was able to read what MacatronicMade wrote, but smanjunath's suggestion was the most useful to me.

I would have still preferred a more formalized method of reinitializing the Node-Red IDE. Such as when on Exporting all flows the flows.json file is reinitialized; perhaps to include a popup that gives the option the reinitialize on full-export.

Thanks, X.

Absolutely not. Then every time you export in order to make a backup you would have that annoying popup, and in addition a careless click would destroy your flows.
If, in a LibreOffice or Word document, you selected and exported the full contents you would not expect it to delete your original would you?

It is very unusual to want to discard the current flows file, but if it is necessary then deleting the flows file is, after all, a very easy thing to do.

1 Like

Hi,

I'd recommend using the 'Projects' feature instead of your current method. You can then keep as many Flows as you want, separate them - your choice. But each Project becomes a separate file that makes it easier to understand the contents / features / focus. Much like a Word or Excel document...

Cheers,

Paul

Really, simple solution have two export options press normal export, or press export with reset. No popups necessary.

I'm a can-do type,
X.

P.S. Guess that's why they have "Projects".

Thanks Paul, now that's a useful suggestion. I've heard about "Projects", I need to look into that.
Do you know of any good how-to videos on "Projects".?

X.

UPDATE: Found this video on Projects: Introduction to Node-RED Projects - YouTube