Skip to content

Runbook: Free disk space on a full Linux host

Find what filled the disk and reclaim space safely on a Linux server or CI agent.

RunbookCreated Updated

Also:no space left on device · disk full · ENOSPC · filesystem 100% · /var/lib/docker full · DiskSpaceLow

  • Builds or writes fail with No space left on device / ENOSPC.
  • Alert: NodeFilesystemAlmostOutOfSpace or disk usage > 90%.
  1. Which filesystem is full? Also check inodes (df -i): Linux: Check disk usage per filesystem
  2. What’s using it? Walk down from the mount point: Linux: Find the biggest directories
  3. df says full but du doesn’t add up? A process holds deleted files: Linux: Find deleted files still holding disk space
  4. Docker host? Check how much is reclaimable: Docker: Show disk used by Docker

Work from safest to most aggressive:

  1. Old journal logs: Linux: Vacuum old journal logs
  2. Dangling images: Docker: Remove dangling images
  3. Rotated logs older than N days: Linux: Delete old rotated logs
  4. Deleted-but-open files: restart the process that holds them.
  5. Everything unused in Docker (destructive, check for local volumes first): Docker: Prune everything unused including volumes
  • df -hT shows usage back under 80%.
  • The failed job or service is retried and succeeds.
  • Scheduled cleanup (cron or systemd timer) on CI agents.
  • SystemMaxUse= in /etc/systemd/journald.conf.
  • Alert at 80% instead of 95%.

My DevOps Playbook by Angelo John Calleja

New runbook

GitHub not connected

Saving is handled by the site: the GitHub token is stored in Cloudflare, not in your browser. Enter the editor password (the EDITOR_PASSWORD secret) to unlock saving in this browser.

Saving commits to gelogrammer/My_DevOps_Playbook. Create a fine-grained token with access to only this repo andContents: Read and write, then paste it here. It is stored only in this browser.

src/content/docs/…