Cleaning up: rm, rmi and prune
Select an icon to see what it is.
Step 5 of 6
system prune does several at once
docker system prune removes stopped containers, unused networks, dangling images and unused build cache. It leaves volumes alone unless you add --volumes, and it keeps tagged images unless you add -a. It first prints what it will remove and asks you to confirm.
$ docker system prunedocker system prune output
WARNING! This will remove:- all stopped containers- all networks not used by at least one container- all dangling images- unused build cacheAre you sure you want to continue? [y/N]