Skip to content

Instantly share code, notes, and snippets.

@ewindisch
Last active August 29, 2015 13:55
Show Gist options
  • Save ewindisch/8711233 to your computer and use it in GitHub Desktop.
Save ewindisch/8711233 to your computer and use it in GitHub Desktop.
Visual deletion of docker containers using 'view'

Description

Semi-visually delete "dead" docker containers.

Overview (video)

Usage Video

Commands / Process

$ docker ps -a | view -

Use visual selection 'V' to select the ids of containers to destroy.

Use 'y' to copy the ids.

Create a new buffer, 'badd x'

Use 'p' to paste your text. You should now see a list of the container ids.

Delete all the listed containers: :%! xargs -n5 docker rm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment