Command

Docker Clean Up Unused Docker Data Command

The Docker command to clean up unused docker data is docker system prune.

Quick Answer

Command
docker system prune
DockerCommand

Clean Up Unused Docker Data

Type this command
docker system prune

Removes stopped containers, unused networks, dangling images and build cache.

Learn More

How to clean up unused docker data in Docker

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

Docker Clean Up Unused Docker Data Command

Run docker system prune.

Related Commands

Frequently asked questions

What is the Docker command to clean up unused docker data?

Run docker system 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