How to Resolve Cpanel Partition Disk Space Is Full Error

How to Resolve Cpanel Partition Disk Space Is Full Error

Sometimes a lot of random stuff starts consuming a lot of your disk space in cPanel. This can result in a partition disk space being a full error in cPanel. In this tutorial, we’ll guide you through how to find what is taking up most of your disk space and how to free it.

How to Free Disk Space in Cpanel?

First things first, use the def command to check if the disk space is actually almost full.

df -h

You should see an output similar to below:

df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 8.7G 0 8.7G 0% /dev
tmpfs 8.7G 7.6M 8.7G 1% /dev/shm
tmpfs 8.7G 59M 8.7G 1% /run
tmpfs 8.7G 0 8.7G 0% /sys/fs/cgroup
/dev/mapper/centos-root 51G 36G 16G 73% /
/dev/sda1 1016M 351M 664M 35% /boot
/dev/mapper/centos-home 1.8T 2.6G 1.8T 1% /home
/dev/loop0 2.2G 195M 1.9G 10% /tmp
tmpfs 2.6G 4.0K 2.6G 1% /run/user/42
tmpfs 2.6G 40K 2.6G 1% /run/user/0

The fifth line in the output above says that the /dev/mapper/centos-root partition is 73% filled. This is the root partition, i.e., all the other partitions are included in this partition so it makes sense to investigate this partition and this partition alone. Make sure that you’re not including other partitions or it’ll end up taking a lot of time.

After getting the results you’ll be able to see the partition consuming the most space. See the name of that partition and execute the following command by replacing $partitionpath with the file path.

du -h --max-depth=1 -x /$partition | sort -hr

Example

Consider the following example,

# du -h --max-depth=1 -x /usr | sort -hr
22G /usr
16G /usr/share
3.9G /usr/local
2.1G /usr/lib64
2.2G /usr/lib
413M /usr/bin
272M /usr/src
181M /usr/sbin
162M /usr/libexec
40M /usr/include
0 /usr/selector.etc
0 /usr/selector
0 /usr/games
0 /usr/etc

Here the /usr/share is consuming the most space. Now we’ll use the command mentioned above by replacing $partitionpath with /usr/share

# du -h --max-depth=1 -x /usr/share | sort -hr

Now that you’ve found the directory consuming the most space, you can check individual files within the directory. You might end up finding out log files or backups that you forgot to clear.

Now you can decide what to decide and what to keep in order to free up space in the disk.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top