How To Solve Issue of Server Disk Usage of 100%?

13th May 2016 0
Shiv Kumar Singh Lead- Technology team
Reach him

Sometimes, we face the issue of server usage reaching to 100% of the server space. However, in reality the application might not be using that much server space.

In order to solve this issue, here, we have listed some steps for you to find the directory usage and remove the unnecessary files:

1. Login to server using your ssh details using putty or command line:

ssh <username>@<host>

In the next step, enter your password.

2. Run the df command to find out information about the total space and available space on the file system including partitions:

df -h


Sample output for the above command

3. As you can see in the above image, the above command is showing that server is using only 28% of the total space. Even then, we are getting error “No space left on device”. So, now we need to check whether server is running out of inodes or not?

4. Sometimes, df command reports that there is enough free space but system claims that the file-system is full. We need to check for the inode which will identify the file and its attributes on the file system using the following command:

df -i


Sample output for the above command

Find unwanted large files and delete them.

Now we need to find directory wise usage in ubuntu. We need to install NCurses Disk Usage.

sudo apt-get install ncdu

Now we will use the following command to check directory usage:

sudo ncdu /


Sample output for above command

In our case, the tmp/cache contains unnecessary temporary files. So we need to delete them.

Navigate to the directory you want to empty.

sudo rm -rf /tmp/cache/*

Here, in our case we would empty the cache folder.

Now again use to df -i to check if the space is released by removing cache directory files or not.


Shiv Kumar Singh – Lead- Technology team

Shiv Kumar Singh ( fondly called as Shivam within CB) is a code geek and Lead- Technology team at Conversion Bug. His area of expertise are Magento, Drupal, iOS, PHP, MySQL, MVC, HTML, Ajax, CSS, JavaScript, jQuery, AJAX, SOAP and OOP. While not working – though it is difficult to say when not working – Shivam likes to explore new platforms and products which can drive more conversion for clients.