Back to commands

Hosting Operations

Read-only

Summarize Docker Disk Usage

The host disk is full and you need a safe storage summary before cleanup.

Command

docker system df -v

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not treat reclaimable space as safe to delete until you verify ownership and backups.

Expected output

A Docker disk usage summary with reclaimable space estimates.

System impact

Read-only. Nothing changes. Docker reads storage accounting data.

Recovery / rollback: no state is changed.

When to use it

Use before cleanup decisions to understand whether images, containers, volumes, or build cache are responsible.

When not to use it

Do not treat reclaimable space as safe to delete until you verify ownership and backups.

Volume warning

Reclaimable image or cache space is different from volume data. Treat volumes as persistent until mapped to containers and backups.

  1. docker system df -v
  2. docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}'

next steps

Related commands

Hosting Operations Read-only

Check Container Health Status

Docker may say a container is running while its health check says otherwise.

docker inspect --format '{{.Name}} health={{if .State.Health}}{{.State.Health.Status}}{{else}}none{{end}} status={{.State.Status}}' web
Hosting Operations Can be slow

Show Containers in a Clean Triage Table

Turn noisy docker ps output into the few fields operators scan first.

docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}\t{{.Ports}}'
Hosting Operations Read-only

Snapshot Container CPU and Memory

Get Docker resource usage once, without leaving a live dashboard running.

docker stats --no-stream --format 'table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}'

next diagnostic step

Where to go from this command

Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.