Clean up comet directory in cPanel

When managing some cpanel servers I sometimes get a problem of inodes that fill up the disk space.

#dh -h

The above command will sometimes show that there is enough disc space however, when I run the following command

#df -ih

You’ll see that the inodes that are free are 0%

There are a few possibilities to clean up some disc space. In the last case, the disk space was filled up due to a spam attack and a lot of spam mails (mailqueue) were temporary moved to the cpanel comet directory.

# /root/.cpanel/comet

You can remove them via the control panel, but when you’re not able to log-in or you just prefer the command line you can use following command.


This will free up some ‘disc space / inodes’.