Consul - API to delete the KV folders that are having many sub folders and keys

Hi Team,

I am trying to get all the KVs under a particular root folder and delete them based on the prefix.
I am able to get the KV’s which are supposed to be deleted.
However, I am not able to delete all the KV folders which are having so many sub folders.
Please note that I tried using the recursive parameter as well in the delete API. it did not help.

Kindly look into it and request you to let me know, if you need any additional information from my side

Best Regards,