How to remove child nodes

Hi,
I have node that contains child nodes.How to remove whole node with chidrens.Pls let me know the code if any one knows

“Child” as in a SubGraph, or “Child” just in the sense of a parent node linked to a child node?

if the former, just delete the subgraph.

if the later, see TreeApp for a sample.