Skip to content

Instantly share code, notes, and snippets.

@uilian
Created January 26, 2018 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uilian/e8780bb2886275e20f191f952e49fa59 to your computer and use it in GitHub Desktop.
Save uilian/e8780bb2886275e20f191f952e49fa59 to your computer and use it in GitHub Desktop.
Remove unused docker objects
#remove stoped containers
docker rm $(docker ps -a -q)
# remove images without references
docker rmi $(docker images -f "dangling=true" -q)
# remove volumes without references
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