ID 603507 - Deleting node presets with nuke.deleteUserPreset does not persist between Nuke sessions

Follow

Problem summary
Deleting node presets with nuke.deleteUserPreset does not persist between Nuke sessions.
However, if you save another preset after deleting one, this seems to correctly update ~/.nuke/NodePresets/user_presets.py and then does persist between Nuke sessions.
 
Customer reported version
Nuke 16.0v2
 
Customer reported platform
Rocky 8
 
Steps to reproduce
 
1) Open Nuke.
 
2) Create a Grade node (or any other kind of node).
 
3) Open the node presets menu > Save as Preset. Save the preset with the name 'test'.
 
4) Run the following code in the Script Editor:
nuke.deleteUserPreset(nuke.getNodePresetID(), 'test')
 
5) Reopen the node presets menu and notice that your custom preset is gone.
 
6) Close and reopen Nuke.
 
7) Create a Grade and open the node presets menu again.
 
Expected behaviour
Deleting a node preset with the nuke.deleteUserPreset function should persist between sessions.
 
Actual behaviour
Deleting the preset does not remove it from ~/.nuke/NodePresets/user_presets.py, so the preset will appear when reopening Nuke.
 
Workaround
Unknown.
 
Reproduced by support
This bug has been reproduced in:
Nuke 16.0v4 - Windows 11 - macOS 15 (Sequoia) 
Nuke 12.0v1- Windows 11 - macOS 15 (Sequoia) 
 
Earliest version tested
Nuke 12.0v1
- This issue appears to be in all tested versions of the product
 

    We're sorry to hear that

    Please tell us why