The removeacct Script

Last modified: February 18, 2021

Overview

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.

Warning:
  • 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]

Options

Use the following options with this script:

Option Description Example
account Required.
The cPanel account that you want to terminate.
username
--child-ok Force the script to terminate a distributed cPanel account via a child node.
Warning:
You should always terminate accounts from the parent nodeOnly use this option in an emergency.
--child-ok
--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



  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The servers_queue Script

Valid for versions 82 through the latest version Last modified: June 21, 2021...

The auto-adjust-mysql-limits Script

Valid for versions 82 through the latest version Last modified: June 21, 2021...

The autossl_check Script

Valid for versions 82 through the latest version Last modified: May 13, 2020 Overview...

The backup Script

Valid for versions 82 through the latest version Last modified: May 13, 2020 Overview...

The backup_restore_manager Script

Valid for versions 82 through the latest version Last modified: July 28, 2022...