Error Codes Wiki

Linux errno 28 (ENOSPC) — No Space Left on Device

Errorerrno

About Linux errno 28 (ENOSPC)

Linux errno 28 (ENOSPC) means the filesystem has no remaining space for new data or metadata. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.

Here are the key things to understand: ENOSPC — filesystem is full. Can also mean inode exhaustion (many small files). Critical — can prevent logging, databases, and system operations. Check both disk space and inode usage. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.

The most common reasons this occurs include: Disk partition is full. Log files consuming all available space. Inode limit reached (many small files). Filesystem reserved blocks preventing writes. Identifying the root cause is the first step toward finding the right solution.

To resolve this, follow these recommended steps: Check space: df -h and inodes: df -i. Find large files: du -sh /* | sort -rh | head -20. Clean old logs: journalctl --vacuum-size=500M. Remove old package cache: apt clean or yum clean all. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.

This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.

Quick Answer

How do I find what is using disk space?

Run: du -sh /* | sort -rh | head to find largest directories.

Overview

Linux errno 28 (ENOSPC) means the filesystem has no remaining space for new data or metadata.

Key Details

  • ENOSPC — filesystem is full
  • Can also mean inode exhaustion (many small files)
  • Critical — can prevent logging, databases, and system operations
  • Check both disk space and inode usage

Common Causes

  • Disk partition is full
  • Log files consuming all available space
  • Inode limit reached (many small files)
  • Filesystem reserved blocks preventing writes

Steps

  1. 1Check space: df -h and inodes: df -i
  2. 2Find large files: du -sh /* | sort -rh | head -20
  3. 3Clean old logs: journalctl --vacuum-size=500M
  4. 4Remove old package cache: apt clean or yum clean all

Tags

linuxerrnoerrno 28 enospctroubleshootingfix

More in Errno

Frequently Asked Questions

Run: du -sh /* | sort -rh | head to find largest directories.