Chromebook & Linux

Linux says disk is full but files were deleted

A full disk after deleting files usually means log files, package caches, or old kernels are using space, or a program is still holding a deleted file open. Cleaning system caches recovers space quickly.

Difficulty
Intermediate
Time
15–40 minutes
DIY cost
$0
Pro cost
$60–$100

Symptoms

  • 'No space left on device' error
  • df shows 100% full despite deleting files
  • Programs fail to save or install
  • Free space doesn't match what was expected after deleting

Likely causes

  • CommonPackage manager cache built upDownloaded package files accumulate in cache folders over time.
  • CommonOld kernel versions kept installedEach kernel update can leave the previous version installed, using gigabytes.
  • PossibleLog files grown very largeSystem or application logs in /var/log can grow unexpectedly large over months.
  • PossibleA deleted file is still held open by a running processSpace isn't freed until the process using the file closes or restarts.

What to do

  1. Run 'df -h' to confirm which partition is actually full.
  2. Run 'sudo apt clean' (or 'sudo dnf clean all') to clear the package manager's download cache.
  3. Run 'sudo apt autoremove' to remove old kernel versions and unused dependencies no longer needed.
  4. Check large log files with 'sudo du -sh /var/log/*' and truncate or delete old rotated logs safely.
  5. If space still doesn't free up after deleting a large file, run 'sudo lsof | grep deleted' to find processes still holding it, and restart that process or reboot.
  6. Consider tools like 'ncdu' to visually find what's using the most space if the cause isn't obvious.

Tools and parts

  • Terminal access with sudo privileges

When to call a pro

If disk usage keeps growing unexplained even after cleanup, a Linux admin can help audit what's consuming space.

Safety

Generally low risk

Generally low risk for a careful person. Stop if anything looks different from what this guide describes.

Related guides

Operator provides AI-generated troubleshooting information. It can be wrong. For safety-critical, electrical, gas, structural, medical, automotive safety, or other high-risk problems, consult a qualified professional.