Command

Docker Remove All Stopped Containers Command

The Docker command to remove all stopped containers is docker container prune.

Quick Answer

Command
docker container prune
DockerCommand

Remove All Stopped Containers

Type this command
docker container prune

Clears out every container that is not running.

Learn More

How to remove all stopped containers in Docker

  1. Open the terminal or command interface for Docker.
  2. Type docker container prune, replace any placeholders, and run it.

Docker Remove All Stopped Containers Command

Run docker container prune.

Related Commands

Frequently asked questions

What is the Docker command to remove all stopped containers?

Run docker container prune.

Where do I type this Docker command?

Type it in the terminal or command-line interface used by Docker.

Does this Docker command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify