When you are removing a child domain with NTDSUTIL you will receive the following error:
DsRemoveDsDomainW error 0x2015 (The directory service can perform the requested operation only on a leaf object.)
If this happen, follow below mentioned steps. When you are done you can follow this article to remove child domain.
Open PowerShell with elevated privileges and execute the following commands in sequence.
Step 1. Type ntdsutil and then hit enter from keyboard
Step 2. Type partition management and then hit enter from keyboard
Step 3. Type connections and then hit enter from keyboard
Step 4. Type connect to server
Step 5. Type q and hit enter from keyboard
Step 5. Type list and hit enter from keyboard. Locate the following entry
Suppose if the domain is contoso.com, then entry would look like
Step 6. Type delete nc dc=domaindnszones,dc=child_domain,dc=extension
Child_domain is the name of child domain
Suppose you have a child domain contoso.com, the command becomes
delete nc dc=contoso,dc=com
Step 7. You are done so quit ntdsutil
If you have more child domains, again follow from step 5.