How to remove parked domain through command line – cpanel
In control panels like cPanel you can simply remove a parked domain via control panel options. Here I will explain how do we can remove a parked domain via command line.
Step 1: SSH to your server as root user.
[[email protected] #] ssh [email protected]
Step 2: Find out all details about the account from ‘/var/cpanel/users’. From that file you can simply find out all of the information including owner ship.
[[email protected] #] grep $username /var/cpanel/users And remove it.
Remove the domain entry from /etc/named.conf and the cooresponding .db file from /var/named and restart your bind server.
Remove the virtual host or ServerAlias (whichever is applicable) from the /etc/httpd/conf/httpd.conf file and restart Apache
Remove files with that domain name as the filename from /etc/valiases, /etc/vdomainaliases, and /etc/vfilters.
If the domain is in /etc/localdomains or /etc/remotedomains then remove it from those files as well. Same goes for /etc/userdomains.