How to terminate or delete a cPanel account through SSH?

How to terminate or delete a cPanel account through SSH?

This post is updated because cPanel changed the script to remove an account via command line. This is simple to manage cPanel via server CLI (command line interface). Here we discuss about the command to terminate an account from CLI. In older versions of cPanel, the command was “killacct.” The original location for this script is:



/scripts/killacct username


# /scripts/killacct crybit
Are you sure you want to remove the account "crybit" [y/N]? y
Running pre removal script (/usr/local/cpanel/scripts/prekillacct)......Done
Collecting Domain Name and IP......Done
Updating ftp passwords for crybit
Purging ftp user crybit
Ftp password files updated.
Ftp vhost passwords synced
crybit account removed

Later cPanel changed the script from killacct to removeacct. In latest cPanel server, you can terminate an account using the following command:



/scripts/removeacct username

That’s it!
Please let me know if you have any questions regarding this.

Related links

  1. Is there any option/scripts to change the cPanel email account’s password from command line?
  2. Important WHM/cPanel Scripts

Arunlal Ashok

DevOps (Server & Cloud infrastructure) Engineer. I'm dealing Linux servers since 2012. I started this blog to share and discuss my ideas. Always happy for an open discussion! Write to arun (@) crybit (dot) com

You may also like...

12 Responses

  1. Jack sulley says:

    A good tut but I want to change the domain of my cpanel account… Ie I don’t have whm access but have ssh root access. So my previous domain was removed or expired now I want to change this please any tutorial or solution

  2. ServerManagementPlus says:

    I am really happy I’ve this information. Thanks!

  3. Shiv says:

    I can not see this script any more, if you have this script than please provide me

    • Shiv, thanks for pointing out this issue. That script (/scripts/killacct) is depreciated and you can use “/scripts/removeacct” for teminating an account via CLI. I’ll update this topic soon.

  4. torrent index says:

    killact is now deprecated in Cpanel , You need to use /usr/local/cpanel/scripts/removeacct [acctname]

  5. Anoopkumar says:

    How to delete all accounts using ssh or a cron job on specified date.

  1. January 14, 2014

    […] How to terminate/delete a cPanel account through SSH? Important WHM/cPanel […]

Leave a Reply

Your email address will not be published. Required fields are marked *