User Tools

Site Tools


cPanel killacct vs removeacct scripts

cPanel and WHM provide almost all of it's interface's functionality via command line. The killacct and removeacct script are two of these that will be covered in this article. For more specific information regarding cPanel's command line functionality visit 1) cPanel CLI.

As of cPanel 11.46 /scripts/killacct has become deprecated and will be removed in future versions.

  warn [killacct] '/scripts/killacct' is deprecated, and will be removed in a later version of cPanel.
  Please use: /usr/local/cpanel/scripts/removeacct instead.

What is /scripts/killacct?

This command line script is used to 'kill' or terminate cPanel accounts. Similar to the functionality provided by ( WHM » Account Functions » Terminate an Account ).

This only removes the account and it's stored content, it does NOT remove the DNS zones belonging to the account. If you remove an account this way and try to recreate it you'll likely get a DNS conflict error and you'll have to manually remove the zone(s).

To use it, run it with the following syntax from command line:

  /scripts/killacct cpaneluser

What is /scripts/removeacct?

This is the new command line script used to replace /scripts/killacct. It also is similar to the functionality provided in the Terminate an Account panel. The biggest difference is the new implementation of removing the DNS zone automatically. It also provides the option to keep the DNS zone via command flag.

Here's the usage dialog provided from the script:


  /usr/local/cpanel/scripts/removeacct <user>


  --force: Bypass confirmation dialog
  --keepdns: Keep zone files from DNS

To remove a cPanel account simply perform the following command:

  /scripts/removeacct cpaneluser

This will provide a prompt to confirm if you'd like to continue with removing the account and the DNS zones for the user. The default option (selected by pressing Enter) is No. So you'll have to type 'y' before proceeding. To skip the confirmation dialog simply add the –force flag as shown:

  /scripts/removeacct --force cpaneluser


The removeacct script is decidedly the better tool and suggested for use when the option is available.

control-panels/cpanel-whm/what-is-the-difference-in-cpanels-killacct-vs-removeacct-script.txt · Last modified: 2020/06/02 07:58 by Karson N.