0
0
Dockerdevops~5 mins

System prune for cleanup in Docker - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AOnly volumes
BStopped containers, unused networks, dangling images, and build cache
COnly running containers
DAll images and containers
How do you force docker system prune to run without confirmation?
A-q
B-y
C--no-confirm
D-f or --force
What extra cleanup does docker system prune -a perform compared to docker system prune?
ARemoves running containers
BRemoves volumes
CRemoves all unused images, not just dangling ones
DRemoves only build cache
Which Docker objects are NOT removed by docker system prune by default?
AVolumes
BStopped containers
CUnused networks
DDangling images
Why might you avoid running docker system prune -a carelessly?
AIt deletes unused images that might be needed later
BIt deletes running containers
CIt deletes volumes automatically
DIt stops Docker service
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.