When Ubuntu reports “No space left on device,” first check which filesystem is full. A large Downloads folder may be irrelevant if the failed write was on another partition. The commands below report usage without deleting files.
Check the filesystem that failed
For a failed write in your home directory, run:
df -h -- "$HOME"Check the Available and Use% columns. If an update or system service failed instead, run df -h / /var. Compare the filesystem and mount columns before deciding which directory to inspect.
Find the largest directories on that filesystem
du -x -h --max-depth=1 -- "$HOME" | sort -hThe command shows space used by the folders directly under your home directory, including hidden directories. The -x option keeps the scan on one filesystem. The home-directory total is usually the last line. For a large Downloads folder, repeat the command with "$HOME/Downloads" if it exists. If the full filesystem is mounted elsewhere, inspect that location instead. Permission errors mean the scan may be incomplete.
Check inodes if there is still space available
df -i -- "$HOME"On filesystems that report inode limits, an inode usage near 100% can prevent creating files even when storage blocks remain available. Many small files are one possible explanation. Investigate the application or folder that created them before changing anything.
Worked example
Suppose df shows your home filesystem at 99% and du identifies a large folder of old exports. Verify the exports are replaceable or backed up, move the files you need to keep to another filesystem, then rerun df to confirm that space was released. If the root filesystem is full while home is on a separate mount, moving files out of home will not free space on root.
GNU documentation for df and du · Run a backup restore test before moving important files.
0 Comments