Manually remove account from WHM/cPanel

Sometimes we want to re-add the domain that we have remove earlier,For this we have to check our DNS Zone file, domainusers file, trueuserdomains file, and trueuserowners file.

Remove the Cpanel User Account:

userdel -r username
groupdel groupname

Delete the /var/cpanel/users/username file
nano /etc/httpd/conf/httpd.conf remove the site VirtualHost entry

Remove the domain from file as below:

/var/named/[domain_name].db (If you used DNS Only cPanel, you may remove zone through WHM).
/etc/userdomains
/etc/trueuserdomains
/etc/trueuserowners
/etc/named.conf
edit /etc/named.conf to remove the domain from BIND
/etc/localdomains

Once all of the above entries removed, you would be able to re-add your domain name again through cPanel.