The cPanel accounts are terminated from the command line by the /usr/local/cPanel/scripts/removeacct script.
The following things must be considered while using this script:-
- All the information for an account is removed by this script. So the account must be completely removed from your server before this script is used.
- An account cannot be recreated immediately after the script has been used to terminate an account (for example, to restore the account from a backup). When the MySQL® users are removed by the system the process gets delayed a little bit.
- The usernamerepresents the username of the account that you wish to terminate in all the examples which have been given in this article.
- The Web Host Manager’s Terminate Accounts Interface (WHM >> Home >> Multi Account Functions >> Terminate Accounts) can be used to terminate a cPanel account.
Some other points which are of considerable importance while using this script are:-
- The/usr/local/cpanel/scripts/removeacct script
- The following command has to be used to terminate a cPanel account from the command line:-
/usr/local/cpanel/scripts/removeacct username [options] |
Options provided by the Script
The following options can be specified when the /usr/local/cpanel/scripts/removeacct script is used:-
Option | Description |
–force | Bypass the confirmation step in the script and then the account must be terminated immediately. |
–keepdns | The account’s zone files must be retained from the DNS server when the script terminates the account is terminated by the script. |