π ~1 min read
Table of contents
Symptom & Impact
File creation fails with no space errors even though disk capacity is free.
Environment & Reproduction
Seen on partitions storing huge counts of small files.
cat /etc/os-release
df -h
df -i
Root Cause Analysis
Filesystem inode pool is exhausted before block space is consumed.
Quick Triage
Locate directories with very high file counts.
for d in /var /tmp /home; do echo $d; find $d -xdev -type f | wc -l; done
df -i
Step-by-Step Diagnosis
Identify small-file hotspots and validate cleanup candidates.
sudo find /var -xdev -type f | sed 's#/[^/]*$##' | sort | uniq -c | sort -nr | head
sudo du -sh /var/tmp/* 2>/dev/null | sort -h

Solution – Primary Fix
Remove stale temp/cache files and enforce retention limits.
Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo find /var/tmp -xdev -type f -mtime +7 -delete
sudo find /tmp -xdev -type f -mtime +3 -delete
sudo apt clean

Solution – Alternative Approaches
Migrate high-churn workloads to filesystem created with more inodes.
sudo rsync -a /var/spool/app/ /mnt/newfs/app/
sudo mount --bind /mnt/newfs/app /var/spool/app
Verification & Acceptance Criteria
Inode utilization drops and file creation succeeds normally.
df -i
touch /tmp/inode_test && rm /tmp/inode_test
Rollback Plan
Recover deleted operational files from backup snapshots if needed.
sudo rsync -a /backup/var-tmp/ /var/tmp/
Prevention & Hardening
Implement scheduled cleanup and monitor inode usage trends.
df -i
# add inode alerts in monitoring platform
Related Errors & Cross-Refs
Related errors include cannot create file and no space left on device with free GB.
Related tutorial: View the step-by-step tutorial for Debian 13.
View all Debian 13 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Linux filesystem inode behavior and Debian operations guidance.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.