No Space Left: Device Shows Free Space, But Nothing Works (Debian)

Abstract: Resolve Debian write failures caused by inode exhaustion or full reserved root space by identifying high-file-count directories and adjusting filesystem settings.

Created: 2026-08-16 by

When a Debian system reports zero available disk space despite df -h showing free blocks, the issue is almost always exhausted inodes or full reserved root space. This state prevents all write operations, causing package managers to fail and services to crash. Restoring functionality requires identifying which directory is consuming inode resources or filling the reserved block area, then removing unnecessary files to reclaim capacity.

Distinguishing Block Usage from Inode Exhaustion

The first step in diagnosing this problem is verifying whether the filesystem has run out of data blocks or inodes. Many administrators assume that because df -h shows free megabytes, the system should be able to create new files. However, Linux file systems have a fixed number of inodes, which represent individual files and directories. If every slot is occupied, no new files can be created, regardless of how much raw storage remains. To check inode usage, run the following command:
df -i
Look at the IUse% column. If it shows 100% on your root partition (/) or home partition (/home), you have an inode exhaustion problem. This commonly occurs when a process creates thousands of tiny files, such as log fragments, session cookies, or temporary cache entries. If the percentage is low but df -h shows 100% block usage, the issue is simply full storage space, not inodes. In cases where both blocks and inodes appear available, check the reserved space. By default, ext4 reserves five percent of total space for the root user. If regular users fill the remaining ninety-five percent, the system effectively becomes read-only for non-root processes, even though df -h might still show some free space until the absolute limit is hit.

Identifying the Culprit Directory

Once you confirm inode exhaustion, you must locate the directory generating excessive files. Use the following script to find the top ten directories with the most files:
find / -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -nr | head -n 10
This command scans the local filesystem, extracts the top-level directory names, counts occurrences, and sorts them in descending order. A high count in /var/tmp, /tmp, or a specific application’s data directory usually indicates a runaway process. For example, a misconfigured cron job or a broken web server cache can generate millions of small files rapidly. If you suspect a specific service, check its logs for errors related to file creation failures. Common offenders include systemd-journald, mail servers creating bounce messages, or database temporary tables. Once identified, stop the offending service to prevent further accumulation while you clean up the existing files.

Resolving Reserved Space Issues

If inode usage is normal but writes still fail, the reserved block space may be the bottleneck. The root user retains access to this reserved area, but standard applications do not. When the usable space drops below the reserved threshold, many daemons will refuse to start or write logs, leading to the "nothing works" symptom described in initial reports. You can view the reserved space percentage using:
tune2fs -l /dev/sda1 | grep "Reserved block count"
Replace /dev/sda1 with your actual root partition identifier. To adjust this setting, use the tune2fs utility. Reducing the reserved percentage can free up space for user processes, though this is generally only recommended if you are certain no other user will require root privileges for emergency repairs.
tune2fs -m 2 /dev/sda1
This command sets the reserved block count to two percent. Be cautious when modifying this value, as lowering it too much reduces the safety margin for critical system updates and kernel operations. After adjusting the setting, verify the change by running the previous tune2fs query again.

Cleaning Up Excessive Files

Deleting files one by one is inefficient when dealing with thousands of small files. Instead, use targeted removal strategies based on the culprit directory identified earlier. For temporary files, clear the system tmp directories:
sudo rm -rf /tmp/*
sudo rm -rf /var/tmp/*
Be extremely careful when using recursive delete commands. Ensure you are targeting the correct directory structure. For application-specific caches, such as those generated by apt or dpkg, use the appropriate cleanup tools rather than manual deletion to avoid breaking package states.
sudo apt-get clean
sudo apt-get autoremove
If the issue stems from journal logs, rotate and truncate them safely:
sudo systemctl restart systemd-journald
This service restart forces the journal to flush old entries and reset file handles, often releasing significant amounts of inodes and block space immediately.

Preventing Future Exhaustion

To avoid recurrence, implement monitoring and automated cleanup policies. Install inotify-tools to monitor directory sizes and trigger alerts when file counts exceed thresholds. Configure logrotate for all major services to ensure logs are compressed and archived regularly, preventing unbounded growth. Additionally, review cron jobs and scheduled tasks for any that generate temporary files without proper cleanup routines. For deeper insights into system stability, consider reviewing how network configurations interact with local storage limits, as seen in related troubleshooting guides for connectivity issues. Ensuring that disk I/O does not become a bottleneck during peak loads helps maintain overall system responsiveness.

Frequently Asked Questions

Why does df show free space but I cannot create files?

This occurs when inodes are fully utilized, leaving no metadata slots for new files. Even with abundant data blocks, the filesystem cannot allocate a new entry without an available inode. Check df -i to confirm if inode usage is at 100%.

How do I safely delete thousands of small files?

Use the find command with the -delete flag or pipe results to xargs for efficient processing. Avoid simple rm -rf * in directories with millions of files, as the shell argument list may overflow. Target specific subdirectories known to accumulate junk data.

Can changing reserved block space fix the issue permanently?

Adjusting reserved space provides temporary relief by freeing up blocks for user processes, but it does not solve underlying causes like runaway processes. It is a mitigation strategy rather than a cure. Always identify and stop the source of excessive file creation first.

What happens if I run out of inodes completely?

The system becomes effectively read-only for non-root users. Package managers fail, logs cannot be written, and new sessions may not start. Root can still operate, but system stability is compromised because core services rely on writing logs and status files.

How can I monitor inode usage automatically?

Integrate df -i checks into your monitoring stack using tools like Prometheus or Nagios. Set alert thresholds at 80% and 95% utilization to provide early warnings before complete exhaustion occurs. Automated scripts can also trigger cleanup routines when thresholds are breached.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More