Symptoms
- 'No space left on device' error
- df shows 100% full despite deleting files
- Programs fail to save or install
- Free space doesn't match what was expected after deleting
Likely causes
- CommonPackage manager cache built upDownloaded package files accumulate in cache folders over time.
- CommonOld kernel versions kept installedEach kernel update can leave the previous version installed, using gigabytes.
- PossibleLog files grown very largeSystem or application logs in /var/log can grow unexpectedly large over months.
- PossibleA deleted file is still held open by a running processSpace isn't freed until the process using the file closes or restarts.
What to do
- Run 'df -h' to confirm which partition is actually full.
- Run 'sudo apt clean' (or 'sudo dnf clean all') to clear the package manager's download cache.
- Run 'sudo apt autoremove' to remove old kernel versions and unused dependencies no longer needed.
- Check large log files with 'sudo du -sh /var/log/*' and truncate or delete old rotated logs safely.
- If space still doesn't free up after deleting a large file, run 'sudo lsof | grep deleted' to find processes still holding it, and restart that process or reboot.
- Consider tools like 'ncdu' to visually find what's using the most space if the cause isn't obvious.
Tools and parts
- Terminal access with sudo privileges
When to call a pro
If disk usage keeps growing unexplained even after cleanup, a Linux admin can help audit what's consuming space.
Safety
Generally low risk
Generally low risk for a careful person. Stop if anything looks different from what this guide describes.