Bird
0
0

You want to automate cleanup but only remove unused images older than 24 hours. Which approach with docker system prune is correct?

hard📝 Application Q9 of 15
Docker - Resource Management
You want to automate cleanup but only remove unused images older than 24 hours. Which approach with docker system prune is correct?
Adocker system prune --filter "until=24h" --force
Bdocker system prune --all --filter "older_than=24h" --force
Cdocker system prune --filter "since=24h" --force
Ddocker system prune --volumes --filter "age=24h" --force
Step-by-Step Solution
Solution:
  1. Step 1: Understand filter syntax

    The correct filter to remove objects unused since a time is until=24h.
  2. Step 2: Validate other filters

    older_than, since, and age are invalid filter keys for prune.
  3. Final Answer:

    docker system prune --filter "until=24h" --force -> Option A
  4. Quick Check:

    Use filter until=24h to prune old objects [OK]
Quick Trick: Use --filter "until=24h" to prune old unused objects [OK]
Common Mistakes:
  • Using invalid filter keys
  • Confusing since and until filters
  • Forgetting --force to skip prompt

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes