π ~1 min read
Table of contents
Symptom & Impact
Writes fail with no space left messages even when df -h shows free capacity.
Environment & Reproduction
Typical with caches creating millions of tiny files.
df -h
df -i
touch /tmp/inode-test
Root Cause Analysis
Filesystem inode table is exhausted by very high file counts.
Quick Triage
Locate directories with extreme file density.
df -i
for d in /var /tmp /home; do echo $d; sudo find $d -xdev -type f | wc -l; done
sudo lsof +L1 | head
Step-by-Step Diagnosis
Rank inode-heavy directories and inspect retention gaps.
sudo find /var -xdev -printf '%h
' | sort | uniq -c | sort -nr | head -n 30
sudo du -xhd1 /var | sort -h
sudo systemctl list-timers --all

Solution – Primary Fix
Purge old cache and temp files that consume inodes.
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
Move high-churn workloads to filesystems with larger inode pools.
sudo mkdir -p /mnt/data/cache
sudo rsync -a /var/cache/app/ /mnt/data/cache/
sudo mount --bind /mnt/data/cache /var/cache/app
Verification & Acceptance Criteria
Inode usage drops and file creation succeeds.
df -i
touch /var/tmp/inode-ok
rm -f /var/tmp/inode-ok
Rollback Plan
Restore cache backup if application behavior changes.
sudo umount /var/cache/app 2>/dev/null || true
sudo rsync -a /mnt/data/cache/ /var/cache/app/
Prevention & Hardening
Implement periodic cleanup policies for temp and cache paths.
sudo systemctl status systemd-tmpfiles-clean.timer
sudoedit /etc/tmpfiles.d/local.conf
sudo systemd-tmpfiles --clean
Related Errors & Cross-Refs
Often confused with ordinary disk-full incidents.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Linux inode behavior and Ubuntu tmpfiles management guides.
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.