BuycPanel Blog

BuycPanel Blog

Latest news and updates

Steps to use the ‘Removeacct Script’ to Terminate cPanel Accounts

Posted by Allura on 19 09 2019.

Introduction
The removeacct script is for cPanel and WHM version 68. From the command line, the /usr/local/cpanel/scripts/removeacct script terminates the cPanel accounts.Warning: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 ScriptIn order to use this script in terminating a cPanel account from the command line, one needs to run the following command:/usr/local/cpanel/scripts/removeacct…

Introduction

The removeacct script is for cPanel and WHM version 68. From the command line, the /usr/local/cpanel/scripts/removeacct script terminates the cPanel accounts.

Warning:

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 the command line, one needs to run the following command:

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

Options

One can specify these options while running this script:

  1. –force:
  • To bypass the confirmation step there in the script and immediately terminate the account.
  • Command: /usr/local/cpanel/scripts/removeacct username –force
  1. –keepdns:
  • 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

Conclusion

All information on how to use the removeacct script in terminating cPanel accounts is outlined in this review.