Large files can use a significant part of your hosting account’s disk allowance. cPanel’s Terminal lets you list those files and compare directory sizes before deciding what needs attention.
Open the correct directory
- Log in to cPanel.
- Open Advanced > Terminal, if your account includes shell access.
- Check the document root for the intended website under Domains.
- Change to that directory in Terminal.
For a main domain that uses public_html, the command is:
cd ~/public_html
pwdUse the actual document root for an additional domain. The following commands search the current directory and its subdirectories, not the whole server.
List large files
To list up to ten of the largest regular files above roughly 100 MiB:
find . -type f -size +100M -exec du --apparent-size -h -- {} + | sort -hr | head -n 10The first column shows each file’s apparent size. These commands list information and do not delete files.
Compare directory usage
To show allocated disk usage for the current directory and its immediate subdirectories:
du -h --max-depth=1 . | sort -hr | head -n 10The total for . includes the directory tree. Allocated disk usage can differ from a file’s apparent size.
Check whether large items are live website files, logs, caches or backup archives. Keep a verified backup and confirm what the application needs before removing anything. cPanel’s Disk Usage screen can help you compare this website with the rest of the account.