Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or the marginally shorter:

    docker images -f "dangling=true" -q | xargs -r docker rmi


You can actually go even shorter:

  docker images -qf dangling=true | xargs -r docker rmi
Along with:

  docker ps -aqf status=exited | xargs -r docker rm
You've got two essential Docker aliases for cleaning up your dev environment.


Looks like my `docker-stats-all` alias:

    docker ps -q | xargs docker stats




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: