Last active
August 29, 2015 14:17
-
-
Save marshyski/457a4453b5bd449527bd to your computer and use it in GitHub Desktop.
Docker Operations and Maintenance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete all docker images | |
for x in `docker images | grep -v REPO | awk '{ print $3 }'`; do docker rmi $x; done | |
# Delete all docker containers | |
for x in `docker ps -a | grep -v CONTAINER | awk '{ print $1 }'`; do docker rm -f $x; done | |
# Start all docker containers | |
for x in `docker ps -a | grep -v CONTAINER | awk '{ print $1 }'`; do docker start $x; done | |
# Fresh docker env in Redhat flavors | |
for x in `docker ps -a | grep -v CONTAINER | awk '{ print $1 }'`; do docker rm -f $x; done | |
yum remove -y docker* | |
btrfs subvolume delete /var/lib/docker/btrfs/subvolumes/ | |
rm -rf /var/lib/docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment