The removeacct Script
Valid for versions 82 through the latest version
Version:
82
Last modified: September 29, 2020
Overview
The /usr/local/cpanel/scripts/removeacct
script terminates cPanel accounts from the command line.
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.
Note:
In the examples throughout this document,
username
represents the username of the account that you wish to terminate.To terminate a cPanel account, you can also use WHM’s Terminate Accounts interface (WHM >> Home >> Multi Account Functions >> Terminate Accounts).
Run the script
To use the /usr/local/cpanel/scripts/removeacct
script to terminate a cPanel account from the command line, run the following command:
/usr/local/cpanel/scripts/removeacct username [options]
Options
When you run the /usr/local/cpanel/scripts/removeacct
script, you can specify the following options:
Option | Description | Example |
---|---|---|
--force |
Bypass the confirmation step in the script and immediately terminate the account. | /usr/local/cpanel/scripts/removeacct username --force |
--keepdns |
Retain the account’s zone files from the DNS server when the script terminates the account. | /usr/local/cpanel/scripts/removeacct username --keepdns |