Skip to content
Disk quota exceeded

Disk quota exceeded

DodaTech 2 min read

The Disk quota exceeded error means you’ve run out of allocated disk space or inodes on the filesystem. This prevents writing new files and can break applications, databases, and system services.

What It Means

Linux enforces disk quotas at two levels: blocks (data size) and inodes (file count). When either limit is reached, write operations fail with this error. Quotas can be set per-user, per-group, or per-filesystem by the system administrator.

Why It Happens

  • The disk partition is full — no free blocks remain.
  • Your user has exceeded their individual quota limit.
  • The filesystem has run out of inodes (too many small files).
  • Log files have grown unbounded (common with web servers and databases).
  • Temporary files in /tmp/ or cache directories have accumulated.
  • A process is writing output to a file without rotation.

How to Fix It

1. Check disk space

df -h

Look for partitions at 100% usage. The -h flag shows human-readable sizes (G, M, K).

2. Check inode usage

df -i

If inodes are at 100%, you have too many small files even if total size is small.

3. Find large directories

du -sh /* 2>/dev/null
du -sh /var/* 2>/dev/null

du -sh shows total size of each directory. Drill down to find the biggest consumers.

4. Use ncdu for interactive analysis

ncdu /

ncdu (NCurses Disk Usage) gives an interactive, sortable view. Install it with apt install ncdu if missing.

5. Clean package cache

sudo apt clean           # Debian/Ubuntu
sudo dnf clean all       # Fedora/RHEL

Removes downloaded .deb or .rpm packages from the cache.

6. Rotate or remove old logs

sudo journalctl --vacuum-time=7d   # Keep 7 days of system logs
sudo truncate -s 0 /var/log/large.log

Use logrotate to set up automatic rotation for application logs.

7. Check your quota

quota -s

Shows your current usage and limits. Requires the quota package to be installed.

What is the difference between df and du?
df shows filesystem-level usage — total, used, and available space per partition. du shows directory-level usage — how much space each folder consumes. They can differ because du doesn’t account for metadata, reserved blocks, or deleted files held open by processes.
Why does df show free space but I still get quota exceeded?
The filesystem has free blocks, but your user has reached their quota limit. Run quota -s to see your personal limit. An administrator can increase it with setquota -u username 0 0 0 0 /dev/sdX.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro