Bird
0
0

Which command correctly removes all unused Docker objects including volumes without asking for confirmation?

easy📝 Syntax Q3 of 15
Docker - Resource Management
Which command correctly removes all unused Docker objects including volumes without asking for confirmation?
A<code>docker system prune --all --volumes --no-confirm</code>
B<code>docker system prune -a --volumes --force</code>
C<code>docker system prune -f -v -a</code>
D<code>docker prune system -a -v -f</code>
Step-by-Step Solution
Solution:
  1. Step 1: Identify flags

    -a or --all removes all unused images, --volumes removes unused volumes, and --force skips confirmation.
  2. Step 2: Validate syntax

    Only docker system prune -a --volumes --force is valid syntax; others use incorrect flags or order.
  3. Final Answer:

    docker system prune -a --volumes --force -> Option B
  4. Quick Check:

    Correct flags and order [OK]
Quick Trick: Use -a, --volumes, and --force together for full prune without prompt [OK]
Common Mistakes:
  • Using incorrect flag names like --no-confirm
  • Wrong command order or misspelling
  • Assuming -f is shorthand for --force without checking

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes