Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To find which domain is consuming disk space, first identify the full filesystem with df -h, then measure the relevant hosting tree with du. Start with a one-level scan such as du -xhd1 /home | sort -hr, descend into the largest account, and check inodes separately with df -i. If you use Plesk or cPanel, compare the panel’s statistics with the live filesystem scan rather than assuming they measure the same scope.

The quickest reliable workflow

Run the checks in this order. Each command answers a different question, so skipping one can lead to the wrong domain or the wrong remedy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Check capacity and mounts: df -h shows which filesystem is full and where it is mounted.
  2. Rank top-level directories: du -xhd1 PATH | sort -hr measures directories on one filesystem and sorts them from largest to smallest.
  3. Drill into the largest account: run another du pass on that account, then on its domain or virtual-host directories.
  4. Check inodes: df -i and, when useful, du --inodes --max-depth=1 PATH | sort -hr reveal exhaustion caused by too many files rather than too many bytes.
  5. Reconcile with your control panel: Plesk and cPanel group and attribute data differently from a raw directory scan.

Replace PATH with the hosting tree on your server. Common examples are /home, /var/www, or a specific virtual-host directory. Do not assume that /home is correct on every distribution or hosting stack; confirm the mount and directory layout first.

Before scanning: establish scope and avoid misleading results

A disk report is meaningful only when its scope is clear. Decide whether you need the whole server, one filesystem, one hosting account, one subscription, or one domain. A server-wide scan can include operating-system data, logs, package caches, backups, mail queues, databases, and container storage that no individual document root contains.

  • Use an account or hosting-tree path when the question is which customer or domain is filling a shared web filesystem.
  • Use a filesystem path when df -h identifies a separate mount for web data, databases, or mail.
  • Record whether the result is a live filesystem measurement or a panel statistic calculated earlier.
  • Keep sufficient privileges for directories that are not readable by your login. If a command reports permission errors, rerun it with the necessary administrative privileges rather than treating omitted paths as empty.

When scanning the root directory, exclude virtual filesystems such as /proc and /sys. Also exclude bind mounts such as /home/virtfs when they mirror data already counted elsewhere. Otherwise, a root-level total can count the same storage more than once or spend a long time traversing pseudo-filesystems.

1. Check filesystem capacity and mount points with df -h

Run:

df -h

The output lists each mounted filesystem, its total size, used space, available space, percentage used, and mount point. Find the row whose percentage is high and note its mount point. That mount point is the boundary for the next du command.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This distinction matters on servers with separate mounts. A full /var filesystem may be caused by logs or databases even when /home is relatively empty. Conversely, scanning / may show a large /home directory while the actual full filesystem is a separate mount with different contents.

The df result is a filesystem-level view. It includes allocated blocks that may not appear as ordinary directory sizes, including space held by deleted files that are still open by a running process. If df -h reports a nearly full filesystem but a carefully scoped du scan is substantially smaller, investigate open deleted files and mount boundaries instead of deleting random domain files.

2. Rank directories with du

Scan one filesystem at a time

For a hosting tree mounted at /home, use:

du -xhd1 /home | sort -hr

The options mean:

  • -x keeps the walk on the same filesystem, preventing data on another mount from being folded into the result.
  • -h displays human-readable units.
  • -d1 limits the report to the starting directory and its immediate children, which makes the first pass fast and scannable.
  • sort -hr sorts human-readable values in reverse order, largest first.

The final line for the starting path is the aggregate visible to that scan; the child lines tell you which account or service deserves a deeper pass. The command does not identify domains by itself. It identifies directories, so you must map the largest directory to an account and then to its domain layout.

Scan the whole root only when you need server-wide triage

For a broad triage pass, use:

du -h --max-depth=1 / 2>/dev/null | sort -hr

This command is useful when you do not yet know whether web files, logs, databases, mail, or backups are responsible. It can be slow and noisy on a busy server, and it should not be treated as a domain report. Exclude /proc, /sys, and bind mounts such as /home/virtfs when constructing a root-level scan. After the largest top-level path is known, stop scanning the rest of the server and continue inside that path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Descend into the largest account

Suppose the first pass identifies an account directory under /home. Run:

du -xhd1 /home/ACCOUNT | sort -hr

Replace ACCOUNT with the actual account directory. Repeat the same pattern on the largest child, for example a web root, mail directory, log directory, backup directory, or application-data directory. A one-level pass at each level is easier to interpret than one enormous recursive listing.

For a known domain directory, measure it directly:

du -xhd1 /path/to/domain | sort -hr

Look for the category that explains the total: uploaded media, application cache, archived logs, email data, database dumps, backup archives, or a directory containing many small files. Do not remove files merely because they are large; identify the owner, purpose, retention policy, and whether the service is still using them first.

3. Map account directories to individual domains

The directory hierarchy depends on the hosting software. A single account can contain a primary domain, add-on or additional domains, subdomains, mailboxes, logs, and databases. The largest account directory is therefore not automatically one domain’s usage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the hosting configuration to map paths. Check the account’s virtual-host definitions, panel file manager, or documented layout to determine which directory is each domain’s document root. Then scan those roots individually. Keep mail, database, and log paths in the inventory even when they are outside the document root; a domain can consume substantial space without that data appearing under public_html or an equivalent web directory.

Symbolic links and mounted directories need special care. A link may point outside the path you are scanning, while -x prevents crossing to another filesystem. A panel may attribute linked or service-managed data to an account even though a document-root scan does not show it. Record the exact path and options used whenever you compare a command-line result with a panel total.

4. Check inode exhaustion separately

Bytes are only one limit. Every file and directory consumes an inode. A server can have free gigabytes but still fail to create files when the inode pool is exhausted. Typical symptoms include upload failures, mail delivery problems, package-install errors, and applications reporting that the disk is full despite apparently available space.

Check inode capacity with:

df -i

Review the percentage used for the same filesystem identified by df -h. To find where the inodes are concentrated, run a scoped count:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
du --inodes --max-depth=1 / | sort -hr

Use the hosting mount instead of / when possible, for example:

du --inodes --max-depth=1 /home | sort -hr

As with byte scans, avoid counting virtual filesystems and mirrored bind mounts in a root-level inode walk. Descend into the largest directory and repeat the command until you find the account, domain, cache, session, queue, or log tree containing the most entries. A large inode count calls for a file-count and retention investigation; deleting one large archive will not solve a problem caused by millions of tiny files.

Plesk: check disk usage per subscription and domain

Use the panel’s statistics view

Plesk exposes subscription and domain statistics in its interface. These statistics group usage into categories such as Web, Mail, Databases, and Other, allowing you to see whether a domain’s total is driven by website files, mailboxes, databases, or another class of data.

Plesk normally calculates statistics during daily maintenance. If you need a current figure for one domain, run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
plesk sbin statistics --calculate-one --domain-name=example.com

Replace example.com with the domain you need to refresh. To recalculate all domains, run:

plesk sbin statistics --calculate-all

Recalculation can take substantially longer when many subscriptions or large filesystems are involved, so use the single-domain command for focused troubleshooting and the all-domain command when you intentionally need a complete refresh.

Understand what Plesk counts

Plesk states that file usage is calculated with DU, database usage comes from MySQL data, and mail usage uses mailbox index files. Its totals therefore combine several measurement methods rather than simply adding the sizes of one document-root tree.

Plesk’s documented SQL method queries domains.real_size and can list subscriptions, customers, domains, subdomains, and additional domains ordered by usage. Use that method when you need a sortable inventory across the Plesk database, but treat the resulting values as Plesk’s accounting fields, not as a replacement for checking the underlying filesystem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why a Plesk domain number can exceed its document root

Plesk documents an attribution rule that often explains apparent discrepancies: web and database files may count toward a subscription’s main domain, while mail and other data are counted for individual domains. A document-root scan can therefore be lower than the domain or subscription number without either measurement being defective.

Plesk also distinguishes domain disk space from a hard quota imposed on files owned by a subscription system account. A reported usage total and an enforced quota answer different questions: one describes categorized consumption, while the other determines when the operating system or hosting system will block additional writes.

cPanel: check account and domain-related usage

Use cPanel’s Disk Usage interface

In cPanel, open Files > Disk Usage for the account overview. The interface can include hidden directories, mailing lists, and database sizes. Its displayed figures may lag behind current filesystem contents or differ from a simple file-tree calculation, so note when the panel last reflected the account and compare it with a fresh, scoped command-line scan.

Measure an account over SSH

For an account named USER, run:

du -h --max-depth=1 /home/USER/ | sort -rh

This cPanel-style command ranks the account’s immediate children. Descend into the largest directory and repeat the command. Include hidden directories in your investigation; a dot-prefixed cache, mail, configuration, or application directory can be absent from a casual file-manager view while still consuming space.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Perform cPanel server-wide triage

These commands provide a broad sequence:

df -h
du -h --max-depth=1 / 2>/dev/null | sort -hr
df -i
du --inodes --max-depth=1 / | sort -hr

Use the root scan to locate the full service area, then switch to the specific account path. Exclude /proc, /sys, and bind mounts when scanning /. cPanel’s account number is not guaranteed to equal the size of one website directory because the panel may include mail, lists, databases, hidden paths, and other account-owned data.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why du, Plesk, and cPanel disagree

Disagreement is usually a scope or timing issue, not a defective command. Compare every result on four axes:

Axis What to ask Typical effect
Scope Is this a filesystem, server, account, subscription, or domain total? A subscription total can include several domains and services, while a document-root scan covers only web files.
Content categories Are web files, mail, databases, logs, backups, and configuration included? A panel may include categories that are outside the path scanned with du.
Freshness Was the value calculated now or during scheduled maintenance? A live du result can change while a panel value remains from an earlier calculation.
Enforcement Is the number reported usage or a hard filesystem quota? A quota can block writes based on ownership rules even when a categorized report looks different.

Use identical boundaries before comparing values. If the panel reports a subscription and the shell command scans only one domain’s document root, the figures are not expected to match. If df -h is larger than all visible du totals, investigate separate mounts, excluded paths, open deleted files, and accounting categories before deleting data.

A practical troubleshooting decision tree

The filesystem is full and one account dominates

  1. Confirm the full mount with df -h.
  2. Run du -xhd1 at that mount point.
  3. Descend through the largest account directory.
  4. Separate web, mail, database, log, and backup paths.
  5. Map each path to its domain or service before applying retention or cleanup rules.

The filesystem is full but no directory explains it

  • Confirm that the du scan used the same filesystem boundary as df.
  • Check for additional mounts that were not included in the scan.
  • Ensure virtual filesystems and bind mounts were handled deliberately rather than counted twice or skipped unexpectedly.
  • Investigate files that were deleted from the directory tree but remain open by a running process.
  • Compare panel categories with the shell path; databases, mail indexes, logs, or backups may live elsewhere.

There is free space but writes fail

  1. Run df -i and inspect inode usage for the affected filesystem.
  2. Use du --inodes --max-depth=1 on the hosting tree.
  3. Descend into the largest inode consumer.
  4. Identify why the directory contains so many entries, such as generated files, caches, sessions, queues, or log fragments.
  5. Remove or consolidate files only under an approved retention policy and with the owning service stopped or coordinated when necessary.

The panel shows a different domain as the largest consumer

First determine whether the panel is attributing shared web or database data to a subscription’s main domain while assigning mail and other data to individual domains. Then refresh Plesk statistics if applicable, or allow for cPanel’s displayed figures to lag. Finally, compare the panel’s category and scope with a matching filesystem path instead of comparing a subscription total with one document root.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to document a defensible result

When reporting which domain uses the disk, include the filesystem mount, command, path, timestamp, and whether the result includes mail, databases, logs, backups, or hidden directories. A useful record states, for example, that a live du -xhd1 scan of the hosting filesystem found the largest account, followed by a second scan that isolated its domain and service subdirectories. Keep the inode result alongside the byte result so that a later incident is not misdiagnosed.

For panel-based reports, record whether Plesk statistics were recalculated with the one-domain or all-domain command, or whether the value came from cPanel’s Disk Usage view. This makes later comparisons possible when scheduled maintenance updates the panel or files change between scans.

Key commands at a glance

Purpose Command
Filesystem capacity and mounts df -h
Top-level usage on one filesystem du -xhd1 /home | sort -hr
Account-level cPanel scan du -h --max-depth=1 /home/USER/ | sort -rh
Server-wide triage du -h --max-depth=1 / 2>/dev/null | sort -hr
Inode capacity df -i
Inode concentration du --inodes --max-depth=1 / | sort -hr
Refresh one Plesk domain plesk sbin statistics --calculate-one --domain-name=example.com
Refresh all Plesk domains plesk sbin statistics --calculate-all

cPanel’s documentation summarizes the filesystem step as: “Use the df command to show the disk usage of each file system.” That is why df -h belongs at the beginning of the investigation, before attributing space to any domain.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.