A

Admin • 833.24K Points
Coach

Q. Which command is used to remove all stopped containers?

  • (A) docker rm -f
  • (B) docker prune
  • (C) docker clean
  • (D) docker rm $(docker ps -a -q)
  • Correct Answer - Option(D)
  • Views: 35
  • Filed under category Docker
  • Hashtags:

Explanation by: Admin

The command 'docker rm $(docker ps -a -q)' removes all stopped containers by listing all container IDs and passing them to 'docker rm'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.