how to get rid of 100% inodes

September 30, 2016 106 views
Nginx PHP Frameworks Ubuntu

Hello all,
Suddenly from this afternoon my site stops working. then i find out its the inodes that gone to 100% was the reason. then after many searching i found the following article and that solved my issue. but not entirely.
No space left on device – running out of Inodes

i followed above tutorial and freed up 5% of innodes by removing only one folder /usr/src with the following command.

rm -rf /usr/src

now i just want to be confirm about 1 thing. that command only delete bad empty files not important files as well? because i have just delete one folder with that command and freed up 5% inodes. but i have couple of more folders with large number of files but im a bit scared to apply this with those.
because after the above command now i can see the whole src folder is deleted.

1 Answer

Removing system folders like /usr/src is never a good idea. While this particular directory is less likely to cause serious issues since it does not generally include binaries you run or support files needed for an application to run, it does contain files required for building components of some software and since these files are managed by the package manager they should not be manually deleted.

Instead you should be looking for what you are running that is creating so many files and where those are being created. I would check your logs in /var/log to see if there are masses of files being created there by a process and review the scripts/services you are running.

Have another answer? Share your knowledge.