Skip to content

Instantly share code, notes, and snippets.

@igez
Last active November 1, 2016 05:55
Show Gist options
  • Save igez/8fb612be132e1658023ff27c2602f2f1 to your computer and use it in GitHub Desktop.
Save igez/8fb612be132e1658023ff27c2602f2f1 to your computer and use it in GitHub Desktop.
Clean ups docker related junks
#!/bin/sh
# clean up unused docker volume
docker volume rm $(docker volume ls -qf dangling=true)
# clean up exited docker containers
docker rm -v $(docker ps -a -q -f status=exited)
# clean up dangling docker images
docker rmi $(docker images -f "dangling=true" -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment