DEV Community

Discussion on: How to clean up your Docker environment

Collapse
m1well profile image
Michael Wellner • Edited on

my actual command:

# clean up docker images and volumes
dockercleanup() {
  docker system df
  docker system prune -f
  docker volume prune -f
  docker image prune -f
  docker system df
}

from github.com/m1well/env-setup

Collapse
deepu105 profile image
Deepu K Sasidharan Author

Seems like you can combine 2 and 3 with --volume flag, 4 never worked for me, don't know why