Written by
Edd Turtle
on gophercoding.com
on
on
(Updated: )
Remove Old Docker Containers (Spring Cleaning)
If you just dabble with Docker, or use it regularly, you will build an arsenal of images and containers as you go along. From time-to-time we need to clear these out. This process used to be more complicated until the docker
command implemented a simpler way using system prune.
Remove all ‘dangling’ things (stopped containers, volumes, images)
|
|
Or run individually:
|
|
|
|
|
|
|
|
As you can see in our screenshot, we had already run the prune command, so there was nothing else to remove :( but it would tell you how much space has been made available.
If you’re still curious how much space is being used, we can use system df
.
|
|
|
|