Child pages
  • The removeacct Script

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
LIB:_Version
LIB:_Version

Toc no bullet

Overview

The /usr/local/cpanel/scripts/removeacct script terminates cPanel accounts from the command line. 

Warning
titleWarning:
  • 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
titleNotes:
  • 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).

The /usr/local/cpanel/scripts/removeacct script

To use the /usr/local/cpanel/scripts/removeacct script to terminate a cPanel account from the command line, run the following command:

Code Block
languagebash
/usr/local/cpanel/scripts/removeacct username [options]

Options

When you run the /usr/local/cpanel/scripts/removeacct script, you can specify the following options:

OptionDescriptionExample
--forceBypass the confirmation step in the script and immediately terminate the account.


Code Block
languagebash
/usr/local/cpanel/scripts/removeacct username --force 


--keepdnsRetain the account's zone files from the DNS server when the script terminates the account.


Code Block
languagebash
/usr/local/cpanel/scripts/removeacct username --keepdns 


Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("accounts","accounttermination") and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("accounttermination","accounts") and label = "cpanel" and space = currentSpace()


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("accounttermination","accounts") and label = "whm" and space in (currentSpace(),"CKB")


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("accounttermination","accounts") and space = "DD"