Sobes.tech
Middle

How to check how much disk space Docker has occupied on the server?

sobes.tech AI

Answer from AI

To see how much disk space Docker is using on the server, you can use the command:

docker system df

It will show the total size of images, containers, volumes, and cache.

For more detailed information:

  • docker images — shows the size of each image.
  • docker ps -s — shows the size of each running container.

To clean up unused data, you can use:

docker system prune

This will help free up space by removing unused images, containers, and volumes.