How to Find the Large Files and Folders Eating Your Disk Space

Your cPanel says you're nearly out of disk space, but you don't remember uploading anything big. Something is eating your disk space, and the trick is finding it. This guide shows how to find the large files and folders on your hosting account using File Manager, Email Disk Usage and a few SSH commands, lists the usual culprits, and explains what's safe to delete.

Why it matters

When an account runs out of space, things fail in confusing ways: email bounces with "mailbox full" or "quota exceeded", WordPress updates and uploads fail, backups can't be written, and databases can't save new data. Fixing it early saves a lot of head-scratching.

Your total usage is shown under Disk Usage in the Statistics panel on the cPanel home page. It includes everything: website files, email, databases, logs and hidden files. See Understanding cPanel Statistics: Disk Space, Bandwidth and Databases for what each figure means.

cPanel's own Disk Usage viewer tool (the one that draws a folder-by-folder chart) isn't included on our standard plans, so this guide uses the tools that are.

Step 1: Split the total into email, databases and files

Start broad. On the cPanel home page, the Statistics panel shows:

  • Disk Usage -- the total.
  • Database Disk Usage -- the part used by MySQL databases.

Then go to Email > Email Accounts and look at the Storage column for each mailbox. Add those up. Whatever is left after email and databases is files.

For most small-business accounts, email is the biggest single part. If that's the case for you, skip to Step 2. If files are the biggest part, go to Step 3 or Step 4.

Step 2: Clean up email with Email Disk Usage

  1. Go to Email > Email Disk Usage.
  2. Choose a mailbox from the Account menu. You'll see each folder (Inbox, Sent, Trash, Spam and your own folders) with its size.
  3. Click Manage next to a large folder to delete messages in bulk -- for example everything older than a year, or everything over 30 MB.

Deleting here is permanent, so save anything you need first. Full steps: How to Free Up Mailbox Space with Email Disk Usage.

Step 3: Hunt for big files in File Manager

File Manager can sort the files in a folder by size, which is enough to find most problems. It can't show you how big a folder is (folders show a small fixed size such as 4 KB), so you work through the likely folders one at a time.

  1. Go to Files > File Manager.
  2. Click Settings, tick Show Hidden Files (dotfiles) and click Save. Some of the biggest space users are hidden folders.
  3. Open your home folder (the house icon at the top of the folder tree).
  4. Click the Size column heading to sort. Click it again to put the biggest files at the top.
  5. Repeat in public_html, public_html/wp-content, public_html/wp-content/uploads and any folder with "backup" in its name.

Look especially for .zip, .tar.gz, .sql, .wpress, .mp4 and .log files, and files named error_log.

Step 4: Find the biggest folders with SSH (fastest)

If you're comfortable with a command line, SSH gives you the whole picture in seconds. Open Advanced > Terminal in cPanel (or connect with SSH -- see How to Use SSH, SSH Keys and Terminal in cPanel). These commands only read and list -- they don't change anything.

Size of every item in your home folder, including hidden ones, smallest to biggest:

cd ~
du -sh * .[!.]* 2>/dev/null | sort -h

Example output:

12M     etc
48M     logs
310M    .trash
1.9G    public_html
4.6G    mail

Now drill into whichever is biggest. For example, inside your website:

du -h --max-depth=1 ~/public_html 2>/dev/null | sort -h | tail -15
du -h --max-depth=1 ~/public_html/wp-content 2>/dev/null | sort -h

Size of each mailbox (folders are named after the domain, then the user):

du -sh ~/mail/*/* 2>/dev/null | sort -h

Every file over 100 MB anywhere in your account:

find ~ -type f -size +100M -exec ls -lh {} + 2>/dev/null | awk '{print $5, $9}'

Change +100M to +20M to cast a wider net. To find oversized PHP error logs:

find ~/public_html -name error_log -size +5M -exec ls -lh {} + 2>/dev/null

If cPanel also warns about File Usage (the number of files, sometimes called inodes) rather than megabytes, count files per folder instead:

du --inodes --max-depth=1 ~ 2>/dev/null | sort -n | tail

Thousands of tiny files usually means a cache folder, a session folder, or a mailbox full of small messages.

The usual culprits

WhatWhere to lookSafe to remove?
Old mail, Trash and Spammail/ -- manage with Email Disk UsageYes, through Email Disk Usage or your mail app. Don't delete mail folders by hand in File Manager.
Old backups you made yourself.zip, .tar.gz or .sql files in your home folder or public_html; plugin folders such as wp-content/updraft, wp-content/ai1wm-backups or wp-content/backups-dup-liteYes, once you've downloaded any you want to keep. JetBackup 5 already backs up your account off the server.
WP Toolkit backupsListed under Back Up / Restore on your site's card in Domains > WordPress ManagementYes -- delete old ones there, not in File Manager.
error_log filesAny folder, especially public_html and wp-adminYes. Read the last lines first -- a huge log means something is erroring constantly, and it will grow back until you fix it.
Cache folderswp-content/cache, wp-content/litespeedClear them from the plugin (for example Purge All in LiteSpeed Cache) rather than deleting by hand.
Image optimization backupsOriginal copies kept by image optimizer plugins, often next to the optimized images in wp-content/uploadsOnly through the plugin's own "remove backups" option, and only once you're happy with the optimized images.
File Manager Trash.trash in your home folderYes. In File Manager click View Trash, then Empty Trash.
Archived raw access logslogs/ in your home folderYes, old months you don't need. Change the archive settings in Metrics > Raw Access so they don't pile up again.
Old copies of the siteFolders like public_html/old, public_html_backup, site-2019, or unused staging sitesYes, after downloading if you want a keepsake. Remove WP Toolkit staging sites from WP Toolkit.
Large mediawp-content/uploads -- videos, huge photosRemove from the WordPress Media Library, not File Manager, so pages don't show broken images. Host videos on YouTube or Vimeo instead.
A bloated databaseDatabase Disk Usage on the home page; table sizes in phpMyAdminClean up through the plugin that created the data (logs, stats, sessions). Take a backup first.

What not to delete

  • Folders in your home directory you don't recognize, such as etc, ssl, tmp, .cpanel, .cagefs and access-logs. They hold your email settings, certificates, statistics and account configuration, and they're rarely large.
  • Anything inside mail/ by hand -- use the email tools.
  • wp-content/uploads as a whole, wp-config.php, or .htaccess.

If you're not sure, download a copy first, or ask us before deleting. Mistakes can usually be recovered from JetBackup 5 within about two weeks -- see How to Restore a File or Folder with JetBackup 5.

Troubleshooting

I deleted lots of files but Disk Usage didn't go down

Disk usage is recalculated periodically rather than instantly, so give it a while. Also check File Manager's Trash -- files deleted without ticking Skip the trash and permanently delete the files are moved to .trash and still count until you empty it.

The numbers from du don't match cPanel exactly

They're measured slightly differently and at different times, and du in your home folder doesn't include your databases. Use du to find where the space is, not to reconcile to the last megabyte.

The space keeps filling up again

Something is writing to disk continuously. Common causes: a plugin in a crash loop filling error_log, a backup plugin on a schedule saving to the server, or a mailbox receiving lots of spam. Run the find commands again a day later and see which file grew.

I can't delete a file -- "permission denied"

Check the file's permissions in File Manager and make sure it's inside your own account. If it still won't go, open a ticket with the full path.

Common questions

Do JetBackup 5 backups use my disk space?

No. Our automatic backups are stored off the server. Backup files you make yourself and leave in your account do count.

Why is my mail folder so large when my inbox is small?

Sent items with attachments, Trash, Spam and folders your mail app created (such as "Archive" or "All Mail") all count. Email Disk Usage shows them all.

Can I just get more space?

Yes, if you've genuinely outgrown your plan -- see How to Upgrade or Change Your Hosting Plan. It's worth cleaning up first; most full accounts are full of things nobody needs.

Related guides

Still stuck? Open a support ticket and the Instant Access Internet Services team will help.

Ultrafast LiteSpeed hosting from InstantAccess.net: free SSL, free backups, cPanel included, no contracts. Check out our $10/month hosting.
  • cpanel disk space full, find large files cpanel, what is using my disk space hosting, du -sh find large folders, free up disk space cpanel, cpanel file usage inodes, hosting account out of space
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Show Hidden Files (.htaccess) in cPanel File Manager

If you are looking for your .htaccess file and it isn't there, it's almost certainly just hidden....

How to Use cPanel File Manager to Manage Your Website Files

cPanel File Manager lets you work with your website files right in your web browser -- no FTP...

How to Edit a File in cPanel File Manager

Instant Access Internet Services customers can edit a file in cPanel File Manager right in the...

How to Upload and Extract a ZIP File in cPanel

The fastest way to put a whole website or a folder full of files on yInstant Access Internet...

How to Compress and Download a Folder in cPanel

cPanel File Manager can download single files, but not whole folders. The trick is to compress...