This article provides a guide demonstrating how to locate and remove 'cruft' after cPanel account removal. This guide is intended for root-level cPanel VPS or cPanel Dedicated Servers administrators.
What is 'Cruft'?
According to cPanel support, "It is possible when removing an account from the server that remnants of that account, or 'cruft', are leftover in the cPanel configuration files and filesystem."
There are several scenarios where expected server processes could fail due to the existence of cruft. Technically, the 'cruft' also consumes server resources such as storage and inodes. Additionally, there's not any benefit to retaining cruft on the server. For maintaining overall server health, we recommend removing it entirely.
How to Locate and Remove Cruft after cPanel Account Removal
To locate and remove cruft after cPanel account removal, follow the steps below:
- SSH the server as root-equivalent user.
- Run the following command to install the acct-info script and setup the shell alias:
alias acctinfo='/usr/local/cpanel/3rdparty/bin/perl <(curl -s https://raw.githubusercontent.com/cPanelInc/tech-acctinfo/master/acctinfo)' - Run the following command to locate cruft:
acctinfo --cruft terminateduserWhere
terminateduseris the previously removed cPanel account username - Observe the output for occurrances of the [EXISTS] descriptor:
/var/cpanel/users/terminateduser [EXISTS] /var/cpanel/overquota/terminateduser [MISSING] /var/cpanel/mainips/terminateduser [MISSING] /var/cpanel/databases/grants_terminateduser.yaml [MISSING] /var/cpanel/databases/terminateduser.json [MISSING] /var/cpanel/databases/dbindex.db.json [EXISTS] - Before removing any files ensure the existence of a full backup exists, as erroneous file removal or corruption of system data could result in system failures, which may be difficult to repair without restoration of previous version.
Conclusion
You now know how to locate and remove cruft after cPanel account removal.

👀 Choose SSD-powered VPS servers for increased speed, power, and security! Now 50% off- starting from only $3.19/mo.