Disk Quota Exceeded for User on Linux – Quick Fixes
Your user hit the disk quota on Linux. Start with the 30-second cleanup, then check quota settings, and finally move files or request an increase.
You're getting "disk quota exceeded" errors. I've seen this on RHEL 7, Ubuntu 22.04, and CentOS 8 — it's almost always a user filling up their allocated space. Here's the fix chain, from quickest to most thorough. Stop when it works.
30-Second Fix: Clear Trash and Temp Files
This gets you out of a jam 8 out of 10 times. Your home directory has a trash folder and temp cache that eat quota fast.
rm -rf ~/.local/share/Trash/* ~/.cache/* ~/.thumbnails/*
find ~/ -maxdepth 1 -name "*.core" -delete
find ~/ -maxdepth 1 -name "*.log" -delete
If you're using a shared server (like a school or corporate box), also check /tmp for files you own:
find /tmp -user $(whoami) -delete
When this works: You accidentally left a browser cache or download that filled your quota. You'll know it worked if you can write a file again.
Skip messing with ~/.bash_history — it's tiny and won't matter.
5-Minute Fix: Check Quota Limits and Identify the Hog
If the quick cleanup didn't cut it, you need to see your actual limits and what's eating space.
Check your quota
quota -s
Output looks like:
Disk quotas for user jdoe (uid 1001):
Filesystem blocks quota limit grace files quota limit grace
/dev/sda1 45000* 50000 55000 7days 1200 2000 2500
The asterisk after 45000* means you're above the soft limit (50000 blocks). You have 7 grace days to get under it. The limit column (55000) is the hard cap — you can't exceed that at all.
Find the real space hog
du -sh ~/* ~/.[!.]* | sort -hr | head -10
This lists the 10 biggest items in your home dir, including hidden files. Common culprits:
- ~/.local/share/Steam — game installs can be 20+ GB
- ~/.npm — node_modules caches (I've seen 8GB)
- ~/snap — Snap packages on Ubuntu bloat fast
- ~/Downloads — old ISOs, tarballs
- ~/.docker — images and containers
Delete whatever you don't need with rm -rf. Be careful — double-check before blowing away ~/.ssh or ~/.config.
15+ Minute Fix: Move Files to Another Partition or Request a Quota Increase
You've cleaned everything, and you're still hitting the limit. Now you need a structural change.
Option A: Move data to a partition without quotas
Check if your system has a /scratch or /data mount that's not quota-limited:
df -h | grep -v quota
mount | grep -v quota
If you find one (like /scratch), move your big files there:
mv ~/big_project /scratch/$(whoami)/
ln -s /scratch/$(whoami)/big_project ~/big_project
Symlink saves you from changing paths in scripts.
Option B: Request a quota increase from the admin
Run repquota -a (only root can use it, but you can ask the admin to show you current usage). Then file a ticket like this:
User jdoe on server devbox1 hitting quota on /home (50000 blocks soft, 55000 hard). Current usage 48000 blocks, main hog is ~/research_data (15GB). Need soft limit bumped to 80000 for next 2 months. Can provide justification on request.
Admins appreciate specifics — don't just say "my quota's full."
Option C: If you have root (local machine), change the quota yourself
sudo edquota -u $(whoami)
This opens a vi screen. Edit the block soft and hard limits (in 1K blocks). For example, to give yourself 100MB soft and 120MB hard:
/dev/sda1 50000 102400 122880 ...
Save and exit. Then apply:
sudo quotaon -a
Check it:
quota -s
Warning: Setting quotas too high can crash the filesystem if disk fills up. Stay under 90% of total disk.
What Not to Waste Time On
- Rebooting the machine — quotas are enforced at the filesystem level, not at boot. Wastes 5 minutes.
- Running
fsck— not a quota issue. Stops you from fixing the real problem. - Reinstalling software — unless you're tracking dirty data, it won't help.
Preventing This Again
Set a cron job to warn you at 80%:
# crontab -e
0 8 * * * /usr/bin/quota -s | grep -q "\*" && echo "Quota almost full!" | mail -s "Quota Warning" you@example.com
Or use ncdu (install it) to visually scan your home once a month:
ncdu ~/
That's it. You're back to work.
Was this solution helpful?