πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Services crash or refuse writes, apt fails, and system logging becomes unreliable due to no space left on device in /var.

Environment & Reproduction

Frequent on Ubuntu 16.04 with small root volumes and verbose logs under /var/log or large apt cache under /var/cache/apt.

Root Cause Analysis

Unbounded log growth, retained journal files, package caches, or runaway application data fills the /var filesystem.

Quick Triage

Run df -h and sudo du -xh /var –max-depth=2 | sort -h to identify top consumers. Check journal size with journalctl –disk-usage.

Step-by-Step Diagnosis

Investigate /var/log, /var/lib, and /var/cache individually, then inspect logrotate configuration and app-specific retention settings.

Illustrative mockup for ubuntu-16-04-lts β€” ubuntu1604-b01-p09-diagnosis
df and du showing /var saturation β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Vacuum journals, clear apt cache with sudo apt clean, rotate/compress oversized logs, and remove stale files safely. Expand volume if growth trend demands it.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-16-04-lts β€” ubuntu1604-b01-p09-fix
log cleanup and journal vacuum restored space β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Move heavy data paths to dedicated partitions, centralize logs to remote collectors, or set stricter retention policies for noisy services.

Verification & Acceptance Criteria

At least 20 percent free space remains on /var, critical services restart cleanly, and apt operations succeed.

Rollback Plan

Restore removed data from backup if retention policy was exceeded; revert filesystem changes if migration introduced path breakage.

Prevention & Hardening

Implement disk usage alerts, enforce logrotate for all apps, and set systemd journal limits in journald.conf.

Often paired with dpkg interruption, MySQL crash recovery loops, and nginx/apache write permission errors due to full inode or block usage.

Related tutorial: View the step-by-step tutorial for Ubuntu 16.04 LTS.

View all Ubuntu 16.04 LTS tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

journalctl(1), logrotate(8), df(1), and capacity management runbooks for Ubuntu servers.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.