How To Fix cPanel Error No Space Left on Device

How To Fix cPanel Error No Space Left on Device

⚠️ Why “cPanel Error: No Space Left on Device” Happens

This error occurs when your server’s disk space is fully consumed, leaving no room for cPanel or system processes to function. When this happens, services like:

  • cPanel/WHM interface

  • Email sending/receiving

  • File uploads

  • Backups

  • Database operations

…can all fail.


🔎 Common Causes

  1. Large Email Accounts – Mailboxes storing too many emails (often with large attachments).

  2. Huge Website Files – Media-heavy websites with large images, videos, or old unused files.

  3. Database Growth – MySQL/MariaDB databases that grow quickly (logs, cache tables, sessions).

  4. Excessive Log Files – System and cPanel service logs (Apache, Exim, MySQL, etc.) consuming space.

  5. Temporary Files – Cached or leftover temp files piling up in /tmp.

  6. Old Backups – Local cPanel backups not rotated or deleted.

  7. Multiple Websites – If hosting many sites, disk quotas can be exhausted quickly.


🛠️ How to Fix the Error

1. Check Disk Usage

# df -h

👉 Shows overall disk usage and which partitions are full.


2. Find Large Files & Directories

# du -ah / | sort -rh | head -n 20

👉 Lists the top 20 largest files/folders to see what’s eating space.


3. Clear Log Files

Many logs are stored in /var/log/.

# cd /var/log ls -lh > large_log_file.log

👉 Empty oversized logs instead of deleting them completely.


4. Delete Old Backups

# sudo rm -rf /backup/*

👉 Remove old/unused backups that are no longer required.


5. Clean Temporary Files

# sudo rm -rf /tmp/*

👉 Clears old temp files and cache.


6. Manage Email Storage (via cPanel)

  • Go to Email Disk Usage.

  • Delete large or unnecessary emails.

  • Empty Trash and Spam folders.


7. Optimize Databases

  • Log in to phpMyAdmin.

  • Select a database → go to Operations tab → click Optimize Tables.
    👉 This reclaims unused database space.


8. Extend Disk Space (if needed)

If you are consistently running out of space:

  • Upgrade your hosting plan.

  • Resize the disk (for cloud servers like AWS, DigitalOcean, Linode, etc.).


✅ After performing these steps, cPanel services should work normally again.

Share

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0