Delete linked node from out-/inputs index Is it possible in python to look at the output or input of a node to which it is connected in order to delete it?
( Blender v2.92.0 )
The case in your picture can be done like
in_soc = your_principled_node.inputs['Base Color']  # example
if in_soc.links:
    from_node = in_soc.links[0].from_node
    your_material.node_tree.nodes.remove(from_node)