Recall & Review
beginner
What command shows the disk space used by Docker images, containers, volumes, and build cache?
The command
docker system df displays disk usage by Docker images, containers, volumes, and build cache.Click to reveal answer
beginner
How can you remove all stopped containers to free up disk space?
Use
docker container prune to remove all stopped containers and free disk space.Click to reveal answer
intermediate
What does the command
docker image prune -a do?It removes all unused images, including dangling and unreferenced images, freeing disk space.
Click to reveal answer
beginner
Why should you manage Docker volumes regularly?
Unused volumes can take up disk space. Running
docker volume prune removes unused volumes to save space.Click to reveal answer
intermediate
What is the effect of
docker system prune?It removes stopped containers, unused networks, dangling images, and build cache to free disk space.
Click to reveal answer
Which command shows detailed disk usage of Docker resources?
✗ Incorrect
docker system df shows disk usage details for images, containers, volumes, and cache.
How do you remove all stopped containers at once?
✗ Incorrect
docker container prune removes all stopped containers safely.
What does
docker image prune -a remove?✗ Incorrect
The -a flag removes all unused images, not just dangling ones.
Which command removes unused Docker volumes?
✗ Incorrect
docker volume prune removes all unused volumes to free disk space.
What does
docker system prune NOT remove by default?✗ Incorrect
Running containers are not removed by docker system prune.
Explain how to check and clean up disk space used by Docker containers, images, and volumes.
Think about commands that show usage and commands that remove unused resources.
You got /4 concepts.
Describe the difference between removing dangling images and all unused images in Docker.
Focus on the meaning of dangling vs unused images and the prune command flags.
You got /4 concepts.