So this morning, I noticed I was having trouble using tab-completion while logged into ssh. I received a
cannot create temp file for here-document: No space left on device message whenever I attempted a tab-completion.
Confused by the “no space left” message when I was using less than 30% of the disk space on the device, I dug into it a little deeper and realized the lack of available “inodes” was actually the problem.
I managed to clear enough files manually to run the following command:
sudo find / -xdev -printf '%h\0' | sort -z | uniq -cz | sort -nrzk 1 | tr '\0' '\n' | head -n 50
That revealed the biggest culprit to be PHP and HHVM session files (FWIW, I don’t use HHVM anymore).
1261734 /var/lib/php5 543376 /var/lib/hhvm/sessions
I’d love to clear these out (especially the HHVM ones) but am not sure of the proper way to do it.
Any advice would be much appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!