Use of Removeacct Script to Terminate cPanel Accounts
Posted by Allura on 04 09 2018.
The removeacct script is for cPanel and WHM version 68. From the command line, the /usr/local/cpanel/scripts/removeacctscript terminates the cPanel accounts.
As a warning it should be kept in mind that:
- Firstly, this script erases all the information for an account. So one should make sure to completely erase or delete the account from one’s server before running this script.
- Secondly, one cannot recreate the account immediately after using this script in terminating an account (as for example, in restoring the account from a backup). A short delay will occur while the system removes the account’s MySQL® users.
It is to be noted that in order to terminate a cPanel account, one can use the WHM’s Terminate Accounts interface (WHM >> Home >> Multi Account Functions >> Terminate Accounts).
The /usr/local/cpanel/scripts/removeacct Script
In order to use this script in terminating a cPanel account from command line, one needs to run the following command:
/usr/local/cpanel/scripts/removeacct username [options]
One can specify these options while running this script:
- To bypass the confirmation step there in the script and immediately terminate the account.
- Command: /usr/local/cpanel/scripts/removeacct username –force
- To retain the account’s zone files from the DNS server when the script terminates the account.
- Command: /usr/local/cpanel/scripts/removeacct username –keepdns
This script helps in terminating a cPanel account and erase all the information from the account by following some technical steps.