Docs / Troubleshooting / How to Recover from a Full Disk

How to Recover from a Full Disk

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 464 views · 1 min read

When your disk hits 100%, many things break. Here's how to recover.

Emergency Cleanup

# Clear systemd journal
journalctl --vacuum-size=50M

# Clear apt cache
apt clean

# Find and remove large temp files
find /tmp -type f -mtime +1 -delete

# Remove old log files
find /var/log -name "*.gz" -delete
find /var/log -name "*.1" -delete

Check What's Using Space

du -h --max-depth=1 / | sort -rh | head -20

Prevention

  • Set up logrotate for all log-producing applications
  • Monitor disk with alerts (e.g., at 80% threshold)
  • Use /etc/cron.daily/ scripts for periodic cleanup

Was this article helpful?