Locate and Remove Cruft after cPanel Account Removal

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.

Warning! This guide is intended for experienced cPanel system 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:

  1. SSH the server as root-equivalent user.
  2. 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)'
    
  3. Run the following command to locate cruft:
    acctinfo --cruft terminateduser

    Where terminateduser is the previously removed cPanel account username

  4. 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]
  5. 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.

  • cruft, account deletion, cpanel server administration
  • 0 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

Disable Network Manager on CentOS 7

This article will provide the steps to disable Network Manager in CentOS 7. Network Manager is...

Disable Network Manager on CentOS 6

This article will provide the steps to disable Network Manager in CentOS 6. Network Manager is...

How to Find the IP of cPanel/WHM Server

This tutorial is designed to troubleshoot and diagnose issues with cPanel license errors. Find...

Uninstall WHMXtra on cPanel Server

This article provides a quick and direct guide for uninstalling the WHMXtra plugin from a...

How to Customize cPanel Installation

This article provides a guide for customizing a cPanel server installation, using the...