Symptoms
When trying to delete an addon domain, the following error is presented:
Error: The domain userdata file for the $domain appears to be missing.
Description
cPanel stores information about domains within the following directory:
/var/cpanel/userdata/$cPanel_account/$domain.tld
On rare occasions, the configuration files for a specific domain become corrupt, resulting in issues when removing domains.
Note: $cPanel_acount needs to be replaced with the actual cPanel account experiencing the issue, and $domain.tld needs to be replaced with the actual domain.
Workaround
Restore the account from the most recent backup to ensure corrupted files are restored. You can restore an account by going to WHM >>Transfers Account Restore.
If account restoration is not an option or restoring does not fix the issue, please open a support ticket: https://docs.cpanel.net/knowledge-base/technical-support-services/how-to-open-a-technical-support-ticket/