BuycPanel Blog

BuycPanel Blog

Latest news and updates

How to use the “Removeacct Script” to Terminate cPanel Accounts?

Posted by Allura on 04 12 2018.


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.

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]


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


This script helps in terminating a cPanel account and erase all the information from the account by following the steps mentioned above.