How to flush all the elements in the list, if there is change in node

list abc{

  leaf bcd{
           type string ;

if there are any changes in the leaf, all the elements in the list has to be deleted.

That would be Bad Thing (trademark Per) to do if that’s config and you ever want to support machine-to-machine interfaces like NETCONF and RESTCONF. Spontaneous reconfiguration by the device make the client/manager get out of sync with the device.
But if you intend to serve human dinosaurs with a CLI/WebUI only, you can for example use a transaction-hook to remove what you want when a certain leaf is changed.
See ConfD UG Chapter “Hooks” and examples.confd/intro/11-c_hooks for details