Delete exited containers docker container rm $(docker ps --filter "status=exited" | awk '{print $1}' | tail -n +2) Delete untagged images docker rmi $(docker images | grep "^<none>" | awk '{print $3}')