Skip to content

Instantly share code, notes, and snippets.

@jmvrbanac
Created July 22, 2014 21:22
Show Gist options
  • Save jmvrbanac/57869866954854dbc513 to your computer and use it in GitHub Desktop.
Save jmvrbanac/57869866954854dbc513 to your computer and use it in GitHub Desktop.
Cleanup all non-running docker images
#!/bin/bash
sudo docker rm `sudo docker ps --no-trunc -a -q`
sudo docker rmi $(sudo docker images | awk '$1!~/centos/ && NR>1 {print $3}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment