Skip to content

Instantly share code, notes, and snippets.

@loplex
Created April 23, 2017 13:48
Show Gist options
  • Save loplex/5348f75d18a1cb7d6dd7034bb2d53fd5 to your computer and use it in GitHub Desktop.
Save loplex/5348f75d18a1cb7d6dd7034bb2d53fd5 to your computer and use it in GitHub Desktop.
#!/bin/sh
### it will call 'inspect' on found docker volumes by default, you can delete them providing 'rm' as parameter
docker_volume_action=${1:-inspect}
#echo $docker_volume_action
docker volume ls -qf dangling=true | xargs -r docker volume $docker_volume_action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment