A full server can crash your website, block email, and cause backups to fail. With the df and du commands, you can see within seconds how much disk space is still free and which folders or files take up the most space. This article shows how to use both tools, how to track down major culprits, and what you can do if the disk fills up.
What df and du do exactly
Both commands run on Linux servers and provide insight into disk usage, but they measure different things. df (disk free) shows the total occupancy per mounted file system, i.e. how much space an entire partition or disk has left. du (disk usage) calculates how much space specific files and folders take up, so you can see exactly where the space is going.
In practice, you use them together: first use df to establish that a disk is filling up, then use du to find out which folder is the cause.
Viewing disk space with df
Log in via SSH and run the following command:
df -h
The -h option stands for human-readable: the output shows space in MB, GB or TB instead of blocks, which is much easier to read. You’ll see columns per file system such as Size (total size), Used (used), Avail (available), and Use% (percentage in use). Pay particular attention to the line with / or the partition your website runs on.
If you only want to check a specific folder, use for example df -h /var. This way you can immediately see whether that partition is separate from the rest of the disk.
Finding large folders with du
Once df shows that a disk is nearly full, you use du to search for the cause. A handy starting command:
du -h --max-depth=1 /var | sort -rh
This shows how much space each subfolder of /var uses, sorted from large to small. If a folder turns out to be very large, dig deeper by adjusting the path, for example du -h --max-depth=1 /var/log. Common culprits are log files, old backup files, temporary upload folders, and cached files from CMS systems.
Solving a full disk problem
If a disk is full, it can cause website errors, failed email delivery, and stopped backups. Follow the steps below to resolve the issue in a structured way.
Check the occupancy
Run df -h to confirm which partition is full and how much space is still free.
Track down the large folders
Use du with –max-depth to zoom in step by step on the folder using the most space.
Clean up unnecessary files
Remove old log files, outdated backups, and temporary files that are no longer needed.
Check in Plesk
View in the Plesk control panel how much disk space and traffic each domain uses, so you can quickly see which website requires the most space.
Consider more storage or switching
If your website is growing structurally, check whether a package with more NVMe storage is needed, or get help switching to Tandata.
If you get stuck or want someone to take a look, check the knowledge base or contact support.
Frequently Asked Questions
What is the difference between df and du?
df shows the total occupancy of an entire file system, while du shows exactly how much space individual files and folders take up.
Why don’t the outputs of df and du match?
This can be caused by deleted files that are still open in a process, reserved space for the system, or differences between file systems and mounted folders.
How do I quickly find the largest files in a folder?
Use du -h --max-depth=1 folder | sort -rh to show subfolders sorted by size, or use find to search for files above a certain size.
Can a full disk affect my email?
Yes, if the disk is full, email can no longer be delivered or processed. A reliable business email solution with sufficient space prevents this kind of problem.
Should I do this myself or can support do it?
You can run these commands yourself via SSH, but if in doubt or in case of an urgent problem, you can always reach out to 24/7 support via WhatsApp, ticket, or email.
Conclusion
With df you quickly get insight into total disk occupancy, and with du you can pinpoint exactly which folders or files take up space. By checking regularly and cleaning up old files, you avoid surprises such as a full disk that takes down your website or email. If you need more space structurally, check out the options for web hosting with NVMe storage.