Skip to content

Instantly share code, notes, and snippets.

@wrparker
Created December 5, 2017 21:50
Show Gist options
  • Select an option

  • Save wrparker/c3770c2ad69a901286aacb00ef50a1b2 to your computer and use it in GitHub Desktop.

Select an option

Save wrparker/c3770c2ad69a901286aacb00ef50a1b2 to your computer and use it in GitHub Desktop.
Removes dangling docker images and volumes
#!/bin/bash
#Remove dangling images
docker rmi $(docker images -q -f "dangling=true")
#Remove dangling volumes
docker volume rm $(docker volume ls -qf dangling=true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment