On this page
How to Free Up Disk Space and Manage Inode Usage in cPanel
Running low on disk space or inodes can cause emails to bounce, file writes to fail, and your website to throw errors - this guide shows you how to find the cause and fix it.
Running low on disk space or inodes can cause emails to bounce, file writes to fail, and your website to throw errors - this guide shows you how to find the cause and fix it.
Understanding disk space and inodes
Disk space is the total storage your account uses, measured in megabytes or gigabytes. Inodes are different: every file, folder, and symbolic link on your account counts as one inode, regardless of how large or small it is. A single zip archive is one inode; ten thousand tiny PHP session files are ten thousand inodes.
You can hit your inode limit while still having plenty of disk space left. When either limit is reached, the effects are immediate: new emails may bounce or stop being delivered, WordPress and other applications may throw errors, and file uploads will fail. Keeping both figures well below your plan limits is good housekeeping.
You cannot adjust your account's inode or resource limits yourself. If you believe your limits are set incorrectly, or if a plan upgrade is not enough, contact our support team.
Finding what is using your space and inodes
Do not guess - use the tools in cPanel to get an accurate picture before you start deleting anything.
Disk usage
The Disk Usage tool in cPanel gives you a directory-by-directory breakdown of your storage. Open cPanel, scroll to the Files section, and click Disk Usage. Sort the list by size, largest first, to find the biggest offenders quickly.
Email disk usage
If mailboxes are the problem, the Email Disk Usage tool gives you a clearer view. It shows each mailbox's size and lets you browse and delete messages folder by folder without leaving cPanel.
Inode count
Your current inode usage is shown in the account summary at the top of the cPanel home page, alongside your disk space and bandwidth figures. The label is typically Inodes and shows your current count against your plan limit. For a folder-by-folder breakdown, see our article on how to check the number of inodes in your hosting account.
Always sort by largest first in the Disk Usage tool. Directories with thousands of tiny files will show a high inode cost even if their total size looks modest.
Common culprits and what to do about them
Email inboxes, Trash, and Spam folders
Mailboxes that have never been pruned are one of the most common causes of high disk usage. The Inbox itself is usually obvious, but the Trash and Junk or Spam folders accumulate silently over months and years. There is also a hidden .trash folder that some mail clients use and that is easy to miss.
Use the Email Disk Usage tool or log in to webmail and empty each folder manually. Pay particular attention to Spam - if you receive a lot of unwanted mail, SpamExperts can filter it before it ever reaches your mailbox and reduces accumulation significantly.
Manual backup copies of your site
One of the most common causes of unexpectedly high inode counts is a developer or site owner copying their entire website to a backup directory - for example, duplicating public_html to public_html_bak or public_html_old. This instantly doubles the inode count for everything in your web root, and the copy is easy to forget about.
If you find a duplicate folder like this, the safest approach is to check the timestamps on the files inside it to confirm when the copy was made, then speak to your web developer before removing anything. If you are confident the copy is no longer needed, you can download it to your computer via SFTP first as a precaution, then delete it from the server.
SFTP clients such as FileZilla let you download an entire folder to your local machine before you delete it from the server. See Uploading files using FileZilla for how to connect.
If you are not sure whether the duplicate folder is still in use, check with your web developer before deleting it. Removing the wrong directory could take your site offline.
WordPress and CMS backup plugin files
Some backup plugins write their archives directly into public_html or a subdirectory of it. A zip archive is only one inode, so this is primarily a disk space concern rather than an inode one - but if a plugin extracts files or stores uncompressed SQL dumps alongside the archive, the inode count can rise quickly. Multiple generations of backups compound the problem.
Any file inside public_html is publicly accessible unless you protect it. An SQL dump or backup archive sitting in a web-accessible directory exposes your database structure and potentially your data to anyone who finds the URL. Move or delete these files immediately.
If you use a backup plugin, configure it to:
- Store backups outside
public_html(for example, in a directory one level above your web root, or to a remote destination such as cloud storage). - Keep only two or three recent copies rather than an unlimited history.
- Schedule deletions of old backups automatically.
Our recommended backup method for your whole account is the cPanel backup tool, which creates a snapshot of your entire account.
Email storage format (mdbox vs maildir)
Our mail servers store messages in mdbox format, which is more efficient than the older maildir format and uses significantly fewer inodes. We convert accounts to mdbox automatically, but this conversion cannot happen if your mail client is connecting via POP3, because POP3 downloads and deletes messages in a way that prevents the server from reorganising them.
If you or your users connect via POP3 and your inode count seems high relative to the number of emails stored, switching to IMAP will allow the conversion to complete and the inode count should come down over time. If you are unsure whether you are using POP3 or IMAP, check your mail client settings - the incoming server type is usually labelled clearly. If you would prefer us to look into it, contact our support team.
PHP session files and application cache directories
PHP writes a session file for every visitor session, and many applications maintain their own cache directories. These files are tiny individually, but on a busy site they accumulate into hundreds of thousands of inodes very quickly.
Common locations to check include:
/tmpor atmpdirectory within your accountvar/cacheorcachedirectories inside your applicationwp-content/cachein WordPress installations
You can safely delete the contents of cache directories - the application will rebuild them. For session files, check with your application's documentation before bulk-deleting, as active sessions will be invalidated. If you use LiteSpeed Cache for WordPress, review its cache settings to ensure old cache files are purged automatically - see Configuring LiteSpeed Cache with WordPress for guidance.
SQL dumps and log files
Manual database exports from phpMyAdmin, or log files left behind after debugging, are easy to forget about. A single uncompressed SQL dump from a large database can consume gigabytes of space, and a verbose log file can grow just as fast.
Check your account root directory and public_html for files ending in .sql, .log, or .bak. Download anything you need to keep, then delete the originals. If you need to export a database regularly, see Exporting databases and tables with phpMyAdmin and make a habit of downloading the file to your computer and removing it from the server immediately.
How to take action
Using File Manager to delete files
- Log in to cPanel and open File Manager under the Files section.
- Before you start, click Settings in the top-right corner and tick Show Hidden Files (dotfiles), then click Save. This reveals folders such as
.trashand other dotfile directories that are hidden by default. - Navigate to the directory you want to clean up.
- Select the files or folders you want to remove, then click Delete in the toolbar. Tick Skip the trash and permanently delete the files to avoid simply moving them to another location that still counts against your quota.
For a full walkthrough of File Manager, see How to use File Manager in cPanel.
Emptying mailboxes and folders
- Use the Email Disk Usage tool in cPanel to browse folders and delete messages in bulk.
- Alternatively, log in to webmail, open each folder (Trash, Junk, Spam), select all messages, and delete them. Then empty the Trash folder to make the deletion permanent.
- For the default cPanel account email address, which is separate from your regular mailboxes, see Deleting emails from the default cPanel account email address.
Setting per-mailbox quota limits
Preventing a single inbox from consuming all available space is straightforward. In cPanel, go to Email Accounts, find the mailbox you want to limit, click Manage, and set a storage quota in megabytes. Once a mailbox reaches its quota, new messages will bounce back to the sender with a mailbox-full error, so set a realistic limit rather than a very low one. For more detail on how quotas work, see Email Storage Quotas: What They Are and How to Manage Them.
Preventing the problem recurring
A few habits will keep your usage under control going forward:
- Prune email regularly. Empty Trash and Spam folders at least once a month. Consider setting up SpamExperts to reduce the volume of junk reaching your mailboxes in the first place.
- Avoid copying your web root as a backup. If you need to keep a copy before making changes, download the directory to your computer via SFTP first, then remove it from the server once you have confirmed you have a good local copy.
- Configure backup plugins sensibly. Store backups outside
public_html, use a remote destination where possible, and keep only a small number of recent copies. - Use IMAP rather than POP3. IMAP allows our servers to store mail in the more efficient mdbox format, which uses fewer inodes.
- Review cache directories periodically. Add a reminder to check your cache and session directories every few months, particularly after a period of high traffic.
- Keep your software up to date. Outdated plugins and themes can generate excessive log output or behave inefficiently. Configuring software auto-updates helps keep things tidy.
If you have genuinely outgrown your current plan rather than simply accumulated clutter, upgrading is a valid option. You can review your options and upgrade your hosting through the Kualo client area, or contact our support team to discuss what would suit you best.