-: In the last section I had mentioned that I'd cleared out
all the stopped containers on my machine,
and so I thought you might be curious on how I did that.
If I run docker ps --all right now,
I can see that I currently have two stopped containers.
So these containers right now are essentially
just taking up disk 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 stopped state.
To delete all these containers,
I can run 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 other items as well,
most notably your build cache.
The build cache is any image
that you have fetched from Docker Hub.
So after running docker prune
you will have to re-download images from Docker Hub,
which is not a really big deal.
Just be aware that you're gonna have to wait
a couple of minutes the next time you start up a container.
Not really a couple minutes, but a couple of seconds really.
So we can enter in "yes", hit Enter,
and then it will tell us about the deleted containers
and it'll tell me also how much space
has been reclaimed by deleting those resources.
If I then do another docker ps --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 wanna 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 disk space.
All right, let's take another quick break,
and we'll continue in the next section.