Follow the steps given below:
First find the owner of the domain, enter the following command:
/scripts/whoowns example.com
If no results are found, enter the following command:
grep example.com /var/cpanel/users/*
You should see something like below
root@server [~]# grep example.com /var/cpanel/users/*
/var/cpanel/users/exam:XDNS1=example.com
Edit the following files with the corresponding user and remove the lines associated with the domain (example.com) you have problem with.
/var/named/example.com.db
Remove the virtualhost for example.com from /etc/httpd/conf/httpd.conf
/var/cpanel/users/username [remove entries related to domain]
/etc/userdomains
/etc/localdomains
vim /etc/named.conf [remove entries related to domain]
Remove DNS entry in WHM
Run /scripts/updateuserdomains as root on the server
That’s it J