What happens when you run docker system prune with default options?

Study for the Kubernetes Cloud Native Associate (KCNA) Certification. Prepare with flashcards and multiple choice questions. Ensure success with detailed explanations. Ready for your exam!

Multiple Choice

What happens when you run docker system prune with default options?

Explanation:
Cleanup of unused docker resources is what docker system prune performs by default. It removes stopped containers, networks not used by any container, dangling images (untagged or unreferenced images), and the build cache from previous builds, freeing up disk space. It does not remove volumes by default, and it does not remove images that are tagged or currently in use. If you want to also remove all unused images (including tagged ones), use -a; to prune volumes, use --volumes. The command typically prompts for confirmation unless you run it with -f to force it.

Cleanup of unused docker resources is what docker system prune performs by default. It removes stopped containers, networks not used by any container, dangling images (untagged or unreferenced images), and the build cache from previous builds, freeing up disk space. It does not remove volumes by default, and it does not remove images that are tagged or currently in use. If you want to also remove all unused images (including tagged ones), use -a; to prune volumes, use --volumes. The command typically prompts for confirmation unless you run it with -f to force it.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy