← Thomas Lackemann

Clear Dangling Docker Containers with 1 Line

Posted on Apr 22, 2015 in

Tired of looking at a bunch of intermediate containers whenever your Docker build fails? Tire no more …

docker rmi -f $(docker images --filter='dangling=true' -q)

This bad boy will force remove all intermediate, or ‘dangling’, containers that Docker creates. Obvious word of caution: This will remove ALL dangling containers without warning. With great power and all that.

Useful? Let me know below.

Cheers!

About

Tom is the CEO (Customer Experience Overlord) of Unicorn Heart Club where he leads development for Astral Virtual TableTop. He's a homebrewer, hiker, and has an about page.

Read More

← Pipes: Or How I Learned to Stop Worrying and Love The Application Script

Comments