Short answer: Check an account’s inode count with uapi --user=bob Quota get_quota_info or repquota -s /. Then find the folders with the most files using du --inodes -x --max-depth=1 /home/bob | sort -rn, and drill into the biggest one. The usual causes are cache folders, PHP session files, old mail in Trash/Spam, unpacked backups, node_modules and logs. Delete only what you have identified, and stop it from growing back with cron cleanup, mail retention and inode alerts.
We ran the commands on this page on our lab server (AlmaLinux 9.8, cPanel & WHM 11.138, ext4 with journaled quotas, Dovecot 2.4.5) on 6 October 2026, against a WordPress test account. The delete commands were not run on the lab; they are shown with a count-first step and checked against the GNU find and Dovecot documentation.
Table of Contents
How inodes are counted on a cPanel server
Every file, directory and symlink uses one inode. Disk quotas count inodes per Unix user, so a cPanel account’s inode count includes every file owned by that user on the filesystem, not only what is under /home/bob.
cPanel itself has no inode limit setting. cPanel’s own blog says WHM “does not include an inode management interface”, and that limits are set with the operating system’s quota tools. CloudLinux adds inode limits per user and per package in CloudLinux Manager. Hosts without either usually only see inode problems as a full filesystem or as a slow backup.
To show customers their count, enable “Display File Usage information in the cPanel stats bar (inode count)” in WHM Tweak Settings.
Check inode usage for an account and for the server
df -i /home # whole filesystem: used / free inodes
repquota -s / | grep -E "^(User|bob)" # quota view per user (use the filesystem that holds /home)
uapi --user=bob Quota get_quota_info | grep -E "inode"
whmapi1 accountsummary user=bob | grep -i inode
Real output from our lab for the test account site1:
# df -i /home
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vda1 5242880 266827 4976053 6% /
# repquota -s / | grep -E "^(User|site)"
User used soft hard grace used soft hard grace
site1 -- 151M 0K 0K 4475 0 0
# uapi --user=site1 Quota get_quota_info | grep inode
inode_limit: '0'
inodes_remain: '0'
inodes_used: 4474
# whmapi1 accountsummary user=site1 | grep -i inode
inodeslimit: unlimited
inodesused: 4474
A limit of 0 means unlimited. Note the small difference: the quota system counted 4,475 files for site1, but find found only 4,444 entries under /home/site1. The rest were files the user owns elsewhere on the same filesystem. On our lab these included the domain’s entries in /etc/valiases, /etc/vfilters and /etc/vdomainaliases and a PHP-FPM socket. On a busy site, PHP session files can be the big one: cPanel’s EA-PHP stores sessions in /var/cpanel/php/sessions/ea-phpXX (session.save_path on our lab was /var/cpanel/php/sessions/ea-php83), and those files are owned by the account user.
If repquota shows nothing or obviously wrong numbers, quotas are broken. Fix that first with fixquotas.
Find which folders use the most inodes
GNU du counts inodes with --inodes. -x stays on one filesystem. Start at the home directory and work down:
du --inodes -x --max-depth=1 /home/bob 2>/dev/null | sort -rn | head -15
du --inodes -x --max-depth=3 /home/bob/public_html 2>/dev/null | sort -rn | head -15
Our lab account (a fresh WordPress install) looked like this. On a real problem account you will see one folder with tens or hundreds of thousands:
4443 /home/site1
4258 /home/site1/public_html
66 /home/site1/mail
53 /home/site1/tmp
14 /home/site1/.cpanel
9 /home/site1/ssl
...
# deeper into public_html
4258 /home/site1/public_html
3118 /home/site1/public_html/wp-includes
950 /home/site1/public_html/wp-includes/blocks
611 /home/site1/public_html/wp-admin
501 /home/site1/public_html/wp-content
To find single directories with many files directly inside them (the classic cache or session folder), count files per parent directory:
find /home/bob -xdev -type f -printf "%h\n" 2>/dev/null | sort | uniq -c | sort -rn | head -15
And to see files the user owns outside the home directory (sessions, sockets, temp files):
find / -xdev -user bob -not -path "/home/bob/*" -printf "%h\n" 2>/dev/null | sort | uniq -c | sort -rn | head
These find commands walk the whole tree and can take minutes on large accounts. Run them with nice -n 19 ionice -c3 on a busy server.
Common culprits and how to clean them
| Where | What it is | Fix |
|---|---|---|
wp-content/cache/, wp-content/litespeed/, wp-content/et-cache/ | Page/object/minify cache files | Purge from the plugin. Lower the cache lifetime or switch to a server-level cache. |
/var/cpanel/php/sessions/ea-phpXX/ or ~/tmp | PHP session files that were never cleaned | /usr/local/cpanel/scripts/clean_user_php_sessions runs daily from cron (added by upcp). Check it runs, and check apps with custom session handlers. |
~/mail/example.com/user/ (Trash, Junk, spam folders) | Years of mail, one file per message (Maildir) | Expire old Trash/Junk mail. Set auto-delete in the mail client or with doveadm. |
node_modules/, vendor/, .git/ | Development dependencies on a live site | Build elsewhere and deploy only the result. Remove leftover copies. |
Unpacked archives, backup-*, old_site/ | Copies of whole sites “just in case” | Archive to one tar file off the server, then delete. |
~/logs/, application log folders | Rotated logs that are never removed | Set log retention. See cPanel log retention. |
wp-content/uploads/ thumbnails | Many image sizes per upload | Remove unused image sizes in the theme, then regenerate. |
Count before you delete, and delete only paths you have identified. A typo in find ... -delete can wipe a site. Make sure a recent backup of the account exists first. Run the count command, read some of the matched paths, and only then add -delete.
Example: cache files older than 7 days in one cache folder:
find /home/bob/public_html/wp-content/cache -type f -mtime +7 | wc -l # count
find /home/bob/public_html/wp-content/cache -type f -mtime +7 | head # look
find /home/bob/public_html/wp-content/cache -type f -mtime +7 -delete # delete
Example: mail in Trash older than 30 days for one mailbox. On cPanel, Dovecot folder names use a dot (INBOX.Trash, INBOX.Junk), as doveadm mailbox list showed on our lab. doveadm expunge takes the same query as doveadm search, so test with search first:
doveadm mailbox list -u bob@example.com
doveadm search -u bob@example.com mailbox INBOX.Trash savedbefore 30d | wc -l
doveadm expunge -u bob@example.com mailbox INBOX.Trash savedbefore 30d
Use doveadm rather than deleting Maildir files with find, so Dovecot’s indexes stay consistent. After any cleanup, recount the quota (it updates as files are removed) and confirm the site and mail still work.
Prevent it from coming back
- Alert before the limit: our Disk and Inode Alert script warns when a filesystem passes a threshold, and the cPanel Disk Usage Report lists the heaviest accounts.
- Set inode limits if you sell hosting plans: per package in CloudLinux Manager, or with OS quotas. Customers then hit their own limit instead of filling the server.
- Schedule cleanup for known cache folders (cron with
find -mtime) and mail retention (cron withdoveadm expunge). - Fix the application: a cache plugin creating millions of files, or sessions never expiring, will come back after every cleanup until it is configured properly.
Check that it worked
repquota -s / | grep bob
uapi --user=bob Quota get_quota_info | grep inodes_used
df -i /home
Compare with the numbers you noted at the start, and check again a week later to see the growth rate. If the server as a whole is out of space as well as inodes, follow the disk full runbook and cPanel disk full cleanup.
Official documentation: cPanel blog: how to manage inode quotas · cPanel KB: adjust inode limits with CloudLinux LVE · CloudLinux docs: limits (inode limits)
Related: cPanel Disk Full: Safe Cleanup of Logs, Backups and Mail · cPanel Quotas Unlimited: fixquotas Repair · Disk and Inode Alert · cPanel Disk Usage Report · Disk full on a production server: recovery runbook
See also: Inode Usage Report: Top Directories by File Count per Account
Frequently asked questions
How do I check inode usage for a cPanel account?
Run uapi –user=bob Quota get_quota_info and look at inodes_used, or repquota -s / for every user. Customers can see it in the cPanel stats bar if File Usage is enabled in Tweak Settings.
Which command finds folders with the most files?
du –inodes -x –max-depth=1 /home/bob | sort -rn | head, then repeat one level deeper on the biggest folder. find with -printf “%h\n” | sort | uniq -c finds single folders with many files.
Why does the quota show more inodes than the home directory has?
Quotas count every file owned by the user on that filesystem, including PHP session files, sockets and mail alias files outside /home/bob.
Does cPanel have a built-in inode limit?
No. cPanel says WHM has no inode management interface. Use OS quota tools or CloudLinux, which adds per-user and per-package inode limits.
How do I delete old mail to free inodes?
Test with doveadm search -u user@example.com mailbox INBOX.Trash savedbefore 30d, then run the same query with doveadm expunge. This keeps Dovecot’s indexes consistent.