Skip to main content

Docker System Commands

These commands give you a big-picture view of Docker - checking disk usage, system info, events, and cleaning up unused resources. They help you monitor, manage, and optimize your Docker environment with ease.

docker → The base command for the Docker CLI

docker system → Manage docker

docker system info → Display system-wide information

docker system df → Show docker disk usage

docker system events → Get real time events from the server

docker system prune → Remove unused data


Docker

docker  →  The base command for the Docker CLI
Usage:  docker [OPTIONS] COMMAND

Description:

Docker commands may need sudo. To skip that extra step, an admin can create a docker group and add users to it. Then you can run Docker directly - no sudo required. 🚀


Docker System

docker system → Manage Docker 
Usage:  docker system COMMAND

Docker system info

docker system info → Display system-wide information 
Usage   : docker system info [OPTIONS]
Aliases : docker info

Description:

  • This command shows kernel version, containers, and unique images.
  • Output can be customized with Go’s text/template.
  • Storage driver adds details like pool name, data/metadata files, and space usage.
  • Data file stores images, metadata file stores their info.
  • On first run, Docker reserves space in /var/lib/docker.
docker system info
″”

Docker system df

docker system df → Show docker disk usage 
Usage   : docker system df [OPTIONS]
Aliases : NA

Description:

  • This command shows how much disk space Docker is using including containers, images, and volumes managed by the Docker daemon.
docker system df
″”

Docker system events

docker system events → Get real time events from the server
Usage   : docker system events [OPTIONS]
Aliases : docker events

Description:

  • This command streams real-time events from the Docker server.
  • Events vary by object type and scope:
    • Local scope → visible only on the node where they happen.
    • Swarm scope → visible across all managers.
  • Shows only the last 256 events.
  • Use filters to narrow down what you see.
docker system events
″”

Docker system prune

docker system prune → Remove unused data
Usage   : docker system prune [OPTIONS]
Aliases : NA

Description:

This command cleans house: it removes all unused containers, networks, and images (dangling or unused). You can also choose to clear out volumes if you want.

Dangling Docker images are layers that have no tags and are not referenced by any running or stopped containers.

docker system prune
″”


Updated on Dec 10, 2025