Recall & Review
beginner
What does the
docker system prune command do?It removes all unused data like stopped containers, unused networks, dangling images, and build cache to free up disk space.
Click to reveal answer
beginner
How can you run
docker system prune without being asked for confirmation?Use the
-f or --force flag to skip the confirmation prompt.Click to reveal answer
intermediate
What is the difference between
docker system prune and docker system prune -a?docker system prune removes dangling images, while docker system prune -a removes all unused images, not just dangling ones.Click to reveal answer
intermediate
Why should you be careful when using
docker system prune -a?Because it deletes all unused images, including those not currently used by containers, which might be needed later.
Click to reveal answer
beginner
Which Docker objects are cleaned up by
docker system prune?Stopped containers, unused networks, dangling images, and build cache.
Click to reveal answer
What does
docker system prune remove by default?✗ Incorrect
docker system prune removes stopped containers, unused networks, dangling images, and build cache by default.
How do you force
docker system prune to run without confirmation?✗ Incorrect
The -f or --force flag skips the confirmation prompt.
What extra cleanup does
docker system prune -a perform compared to docker system prune?✗ Incorrect
The -a flag removes all unused images, not just dangling images.
Which Docker objects are NOT removed by
docker system prune by default?✗ Incorrect
Volumes are not removed by default with docker system prune.
Why might you avoid running
docker system prune -a carelessly?✗ Incorrect
Because it deletes all unused images, which might be important for future use.
Explain what
docker system prune does and when you might use it.Think about cleaning up unused Docker resources to save space.
You got /5 concepts.
Describe the difference between
docker system prune and docker system prune -a and why the latter requires caution.Consider what images are removed and the impact on your Docker environment.
You got /4 concepts.