Yes, you can delete STPNodes after the connection has already been built, but only if all the devices in the domain have been discovered (such as through a seedfile). This can be done properly during post processing. STP-related connections will persist and this will not affect any root cause analysis.
However, this cannot be done if all devices in the domain have not been discovered. For example, conside the following scenario:
- Device A is connected to Device B through STP
- Device A is discovered first
- After Device A is discovered, then all the STPNodes of Device A are deleted
- Device B is then discovered
In the above conditions, there will not be any STP connections formed between Device A and Device B. So, deleting STPNodes after discovery or during post processing will only work if all the devices in the domain have been discovered.
Also, if you delete STPNodes and a single device is added later which is actually connected to one of the devices already present in the topology, then the connection will not get formed through STP since there are no STPNodes for existing devices.