- To delete all stopped container, we can use above command.
- Note: it will not delete the container that is running.
- To delete the container we use
docker container rm @id/@name
- If you were following the tutorial you might have one container still running in background. Let's stop and delete this container.
- To delete all dangling images we can use
docker image prune
- This will delete all dangling images.
- Dangling image = Images that doesn't have any containers.
- To delete an image we can run
docker image rm @id
.