1 00:00:00,660 --> 00:00:04,850 In the last section I'd mentioned that I cleared out all the stopped containers on my machine. 2 00:00:04,860 --> 00:00:07,110 So I thought you might be curious on how I did that. 3 00:00:07,110 --> 00:00:12,660 If I run Docker P.S. dash dash all right now I can see that I currently have two stopped containers 4 00:00:13,050 --> 00:00:18,240 so these containers right now are essentially just taking up space on my computer and so it might be 5 00:00:18,240 --> 00:00:24,090 to my advantage to try to entirely delete them and not just leave them in this stop state to delete 6 00:00:24,150 --> 00:00:25,260 all these containers. 7 00:00:25,290 --> 00:00:32,730 I can run a docker system prune I'll then be presented with a warning here. 8 00:00:32,830 --> 00:00:37,960 So just to be clear this is not only going to delete stopped containers it's also going to delete a 9 00:00:37,960 --> 00:00:44,920 couple of either items as well most notably your build cache the build cache is any image that you fetch 10 00:00:44,920 --> 00:00:45,760 from Docker Hub. 11 00:00:46,180 --> 00:00:51,670 So after running Docker prune you'll have to read download images from Docker Hub which is not a really 12 00:00:51,670 --> 00:00:52,390 big deal. 13 00:00:52,390 --> 00:00:54,810 Just be aware that you're gonna have to wait a couple minutes. 14 00:00:54,880 --> 00:00:56,200 The next time you start up a container. 15 00:00:56,200 --> 00:00:59,690 Not really a couple of minutes but a couple of seconds really so we can enter in it. 16 00:00:59,710 --> 00:01:00,580 Yes. 17 00:01:00,580 --> 00:01:06,400 Hit enter and then it will tell us about the deleted containers and I'll tell me also how much space 18 00:01:06,400 --> 00:01:09,240 has been reclaimed by deleting those resources. 19 00:01:09,310 --> 00:01:16,390 If I then do another Docker P.S. dash all I'll see that I do not have any stopped containers whatsoever. 20 00:01:16,390 --> 00:01:22,720 I really recommend you keep the docker system prune command in mind because anytime that you're kind 21 00:01:22,720 --> 00:01:27,490 of done working with Docker for a period of weeks or months or if you decide you just don't want to 22 00:01:27,490 --> 00:01:32,590 work with Docker again at all you will want to run this command to delete any containers that are still 23 00:01:32,590 --> 00:01:35,800 just kind of sitting around eating up space. 24 00:01:35,800 --> 00:01:38,760 All right let's take another quick break and we'll continue in the next section.