problem hub
Read-only firstLinux disk full or no space left on device
Prove which filesystem is full, check inodes, then rank directories and files before deleting anything.
Safest first command
df -h
Before you run this
Expected output: Mounted filesystems with size, used, available, use percentage, and mount point.
When not to use it: Do not start cleanup from this page if you already know a database, volume, or backup job is actively writing; capture service-specific evidence first.
Expected output example
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 50G 49G 900M 99% /
/dev/vdb1 100G 42G 58G 42% /srv/data
How to read the result
Start with the mount point at the highest Use%. Clean inside that mounted filesystem, not the path where the application happened to report the error.
Fast path
Start with mount-level evidence. Disk-full symptoms often appear in an application path, but the full filesystem may be root, /var, /boot, a Docker volume, or a mounted data disk.
df -hdf -idu -xhd1 /var 2>/dev/null | sort -h
Do not delete random large files
Large logs, databases, uploads, backups, and Docker layers each have different cleanup paths. Rank first, then identify ownership and service impact.
Common causes
- Large logs under /var/log
- Package cache or old kernels
- Docker images, layers, volumes, or container logs
- Backups or uploads stored on the wrong mount
- Deleted files still held open by a running process
What not to change yet
- Do not delete files from /usr, /var/lib, /boot, or Docker volumes until you know what owns them.
- Do not run cleanup commands before checking bytes, inodes, and deleted-open files.
- Do not assume the largest file is safe to remove.
platform notes
Distro and service notes
Debian/Ubuntu
APT cache and old kernels can be part of the cleanup path, but inspect first.
Docker
Docker disk pressure needs Docker-specific inspection before prune commands.
systemd journal
Journal cleanup should come after checking journal size and retention needs.
supporting commands