The removeacct Script

Valid for versions 96 through the latest version



Last modified: February 18, 2021


The /usr/local/cpanel/scripts/removeacct script terminates a cPanel account from the command line. You can also use WHM’s Terminate Accounts interface (WHM » Home » Multi Account Functions » Terminate Accounts) to terminate an account.

  • This script removes all of the information for an account. Make certain that you wish to completely remove the account from your server before you run this script.
  • After you use this script to terminate an account, you cannot recreate the account immediately (for example, to restore the account from a backup). A short delay occurs while the system removes the account’s MySQL® users.

Run the script

To run this script on the command line, use the following format:

/usr/local/cpanel/scripts/removeacct [account] [options]


Use the following options with this script:

Option Description Example
account Required.
The cPanel account that you want to terminate.
--child-ok Force the script to terminate a distributed cPanel account via a child node.
You should always terminate accounts from the parent node. Only use this option in an emergency.
--force Skip the script’s confirmation prompt and terminate the account. --force
--keep-remote-databases Keep the account’s remote databases and users on the server after account termination, if any exist. --keep-remote-databases
--keepdns Keep the account’s zone files on the DNS server after account termination. --keepdns
--help Display the script’s help documentation. --help

Additional Documentation