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