Command
docker system prune
Explanation
Removes stopped containers, unused networks, dangling images, and build cache.
Examples
Remove unused objects
docker system prune
Remove all unused images
docker system prune -a
docker system prune
Removes stopped containers, unused networks, dangling images, and build cache.
Remove unused objects
docker system prune
Remove all unused images
docker system prune -a