Problems deleting items in global context

I have too much entries in the global context ("file") stored.
I want to delete them by hand in the .node-red/context/global/global.json
with node-red-stop
the memory shoud be flushed to file
with
sudo nala I have deleted the no longer desired items in global.json
save
reopen, and the deleted items are no longer seen
node-red-start
the deleted items are added at the end of the context.json file
in the flows there is no code which manipulates the deleted items

What is going on? How to solve this?

thx for any suggestions

You can in a change node
delete flow.path
And in a function node
flow.set(path, undefined)

I suspect you may be mistaken. If you delete the data from the file then something must be writing it back.

it must have to do with copy / Backup from another file or with memory flush ?

yes, but that are too much entries (hundreds)

Then use delete

let foo = flow.get("bar");
delete foo.path;
flow.set("bar", foo);

Maybe you should rethink how you store the globals to make things less dirty.

var cDevices = ["81", "82", "83", "84", "85", "86", "87", "88", "89"];
var cTypes=["RAlarmT","RAlarmF","RAlarmQ"];

let dLen = cDevices.length;
let tLen = cTypes.length;

for (var i = 0; i < dLen; i++) {
    var cTemp1=cDevices[i].replace(/\s/g, '_');

    for (var ix = 0; ix < tLen; ix++) {
         var cTemp2=cTypes[ix];
         var cToDelete=cTemp1+cTemp2;
         node.warn(cToDelete);
         global.set(cToDelete,undefined,"file");
    }
}

and so on with other Kombinations not nice, but a very dirty solution