Bird
0
0

After executing docker system prune --volumes, volumes were not deleted. What is the most probable reason?

medium📝 Troubleshoot Q6 of 15
Docker - Resource Management
After executing docker system prune --volumes, volumes were not deleted. What is the most probable reason?
AThe volumes are still in use by at least one container
BThe <code>--volumes</code> flag is deprecated and ignored
CDocker daemon needs to be restarted to apply prune changes
DThe command requires <code>-a</code> flag to remove volumes
Step-by-Step Solution
Solution:
  1. Step 1: Understand volume removal conditions

    Docker only removes unused volumes; volumes attached to containers are preserved.
  2. Step 2: Check volume usage

    If volumes are still referenced by containers, prune will not delete them even with --volumes.
  3. Final Answer:

    The volumes are still in use by at least one container -> Option A
  4. Quick Check:

    Volumes in use are never removed [OK]
Quick Trick: Volumes must be unused to be pruned with --volumes [OK]
Common Mistakes:
  • Assuming --volumes removes all volumes regardless of usage
  • Believing daemon restart is needed
  • Thinking -a flag is required for volumes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes