exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 87 discussion

Actual exam question from CompTIA's XK0-005
Question #: 87
Topic #: 1
[All XK0-005 Questions]

A cloud engineer needs to remove all dangling images and delete all the images that do not have an associated container. Which of the following commands will help to accomplish this task?

  • A. docker images prune -a
  • B. docker push images -a
  • C. docker rmi -a images
  • D. docker images rmi --all
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linux_admin
Highly Voted 11 months, 3 weeks ago
Selected Answer: A
A. docker images prune -a The "docker images prune -a" command will remove all dangling images, which are images that are not associated with any existing containers, as well as all images that do not have an associated container. The "-a" option specifies that all images should be removed, regardless of whether they are in use or not.
upvoted 5 times
...
Ckl22
Most Recent 1 year, 1 month ago
Selected Answer: A
A is the correct answer: $ docker image prune [OPTIONS] --all , -a Remove all unused images, not just dangling ones
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...