Find and fix a full Linux disk or exhausted inodes

8 steps · about 1 h 46 min · Beginner

  1. Spot deleted files still held open with lsof (reference, linux.die.net, 15 min)

    Explains why df stays full after rm and how to find the process holding the file.

  2. Rotate and compress logs with logrotate (reference, linux.die.net, 20 min)

    Turns runaway logs into a bounded, automatic routine.

  3. Clean temporary directories with tmpfiles.d (reference, man7.org, 12 min)

    Adds age-based cleanup of /tmp and cache paths without a custom script.

  4. Cap journal size in journald.conf (reference, man7.org, 12 min)

    Stops the systemd journal from filling /var.

  5. See what the filesystem reports underneath (reference, man7.org, 12 min)

    Shows the kernel data df reads, including reserved blocks and inode counts.

  6. Browse usage interactively with ncdu (tutorial, linux.die.net, 10 min)

    A faster way to find the heavy directory than repeated du.

  7. Know the core utilities you will use (guide, ArchWiki, 10 min)

    Reference for the everyday tools behind this task.

  8. See how ext4 allocates inodes (doc, kernel.org, 15 min)

    Explains why a filesystem can run out of inodes with space free.