Bird
0
0

Which of the following is the correct syntax to remove all unused Docker volumes?

easy📝 Syntax Q3 of 15
Docker - Resource Management
Which of the following is the correct syntax to remove all unused Docker volumes?
Adocker volume rm -a
Bdocker volume delete --all
Cdocker volume clean
Ddocker volume prune
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to remove unused volumes

    The correct command to remove unused volumes is docker volume prune.
  2. Step 2: Check syntax correctness

    Options with flags like -a or --all are invalid for volume removal.
  3. Final Answer:

    docker volume prune -> Option D
  4. Quick Check:

    Remove unused volumes = docker volume prune [OK]
Quick Trick: Use 'docker volume prune' to clean unused volumes safely [OK]
Common Mistakes:
  • Using invalid flags like '-a' with volume commands
  • Confusing 'docker volume rm' which requires volume names
  • Assuming 'docker volume clean' is a valid command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes