Evaluating cPanel Disk Usage in cPanel and the Command Line

Originally by Katie Hartraft.

As your community grows and you gain more accounts, your server disk space fills up with it. Oftentimes, this can be helped by clearing out old accounts. If you are not looking to decommission accounts or are still running into disk space trouble, you may choose to investigate individual accounts with high disk usage. Below I will cover where to check disk usage for a single cPanel account both within the cPanel dashboard and within SSH/Terminal.

cPanel

cPanel has a tool in the control panel called Disk Usage which is found under the Files section. It can also be found on the right-hand sidebar under Statistics.

Thankfully cPanel has provided an update to this feature. If you scroll down, the tool is at the bottom of the page.

Evaluating_cPanel_Disk_3.png

Clicking the > symbol in front of the directory you wish to examine will expand it and show the subdirectories as shown in the example below. Each directory with a > in front of it can be expanded further.

This will help quickly navigate the account and see what type of data is taking up the most space and where.

Command Line

If you would rather not have to go into the cPanel account, you can search through the files in a similar via the command line in Terminal.

Once connected through SSH into the root of the server, navigate to the user’s folder (/home/cpanelusername) and enter the command ncdu. The interface given is fairly friendly and will allow you to navigate files using your arrow keys, with directories/files listed largest to smallest.

Because the folders and files are ordered by size we recommend starting at the root of your account and running the tool. You can use the arrow keys to move up or down and enter to navigate into a folder and get a readout of the size of its contents. In our experience, it makes quick work of analyzing disk space issues and finding any opportunities to clear out the cruft. When you’re finished simply hit the q key to quit.

We’ve added ncdu to most of our servers but if for some reason it’s not available on your server, put in a support ticket and we’d be happy to make sure it gets added.

If you have concerns about disk usage on your cPanel, you can find recommendations for managing your usage in this article.

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

Reclaim Hosting Support Hours
8:00 am - 5:00 pm ET, Monday through Friday
Submit a Ticket
Get a quick and helpful response from the pros.
Need Extra Support?
No problem, we're here to help! Talk to us about Professional Services.