Skip to content

Instantly share code, notes, and snippets.

@alpegon
Created July 6, 2016 14:38
Show Gist options
  • Select an option

  • Save alpegon/7c8f62e34e1c1f17902da5081d4fcbc5 to your computer and use it in GitHub Desktop.

Select an option

Save alpegon/7c8f62e34e1c1f17902da5081d4fcbc5 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Removes docker containers then docker images and lastly clears cache
# From https://github.com/docker/docker/issues/928
docker rm $(docker ps -a -q) && docker rmi $(docker images -q) && docker ps -a | cut -c-12 | xargs docker rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment