docker:tldr:82bee
docker: Remove unused data.
$ docker system prune
try on your machine
The command docker system prune
is used to clean up unused Docker resources like containers, images, networks, and volumes that are not currently being used by any running container.
When you run this command, Docker will perform the following clean-up actions:
- Remove all stopped containers: It removes all containers that are not currently running.
- Remove all unused networks: Docker deletes any network created by the user and not currently in use by any containers.
- Remove all dangling images: Dangling images are the intermediate images left behind when you build a new version of an image. Docker deletes these unused images.
- Remove all build cache: If you have any build cache stored on the system, Docker will remove it.
- Remove all unused volumes: Docker removes any volumes that are not currently being used by any containers.
Note that before performing any deletions, Docker will prompt you to confirm the removal of these unused resources, giving you the opportunity to review and prevent any accidental removal.
This command is handy to reclaim disk space on your Docker system by removing any unused containers, images, networks, and volumes.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.