As paxRoman suggested, to remove a node, you can do:
node.exit().remove();
Now, to find the empty nodes, you can use the weight property for the force nodes, as described in the sequencing layout documentation :
weight - node weight; number of related links.
So finally, to get all the empty voids, you can do:
force.nodes (). Filter (function (d) {d.weight == 0})
with force is your power layout.
Also note that the weight property will only be initialized when force.start() called, as described in the documentation:
These attributes do not need to be set before passing the nodes to the layout; if they are not set, suitable defaults will be initialized by the layout when the start is called
source share