In the last section I'd mentioned that I cleared out all the stopped containers on my machine.
So I thought you might be curious on how I did that.
If I run Docker P.S. dash dash all right now I can see that I currently have two stopped containers
so these containers right now are essentially just taking up space on my computer and so it might be
to my advantage to try to entirely delete them and not just leave them in this stop state to delete
all these containers.
I can run a docker system prune I'll then be presented with a warning here.
So just to be clear this is not only going to delete stopped containers it's also going to delete a
couple of either items as well most notably your build cache the build cache is any image that you fetch
from Docker Hub.
So after running Docker prune you'll have to read download images from Docker Hub which is not a really
big deal.
Just be aware that you're gonna have to wait a couple minutes.
The next time you start up a container.
Not really a couple of minutes but a couple of seconds really so we can enter in it.
Yes.
Hit enter and then it will tell us about the deleted containers and I'll tell me also how much space
has been reclaimed by deleting those resources.
If I then do another Docker P.S. dash all I'll see that I do not have any stopped containers whatsoever.
I really recommend you keep the docker system prune command in mind because anytime that you're kind
of done working with Docker for a period of weeks or months or if you decide you just don't want to
work with Docker again at all you will want to run this command to delete any containers that are still
just kind of sitting around eating up space.
All right let's take another quick break and we'll continue in the next section.