[Hawkular-dev] docker clean up

Alissa Bonas abonas at redhat.com
Thu Sep 28 05:40:26 EDT 2017


On Tue, Sep 5, 2017 at 4:35 PM, John Mazzitelli <mazz at redhat.com> wrote:

> Just a little set of tricks that might be helpful to others.
>
> If you want to clean up your docker:
>
> * Delete all containers: docker ps -q -a | xargs docker rm
>

you'd probably want 'docker stop...' before 'docker rm...'
and as Jiri's file mentions, cleaning networks could be relevant too.



> * Delete all images: docker rmi $(docker images --filter dangling=true)
> * Another way of removing all images is: docker images -q | xargs docker
> rmi
> * If images have dependent children, forced removal is via the -f flag:
> docker images -q | xargs docker rmi -f
> * Delete untagged images: docker rmi $(docker images | grep "^<none>" |
> awk '{print $3}')
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hawkular-dev/attachments/20170928/8c9d0872/attachment-0001.html 


More information about the hawkular-dev mailing list