ℹ️ to change the default color of the images replace #6c63ff with whatever color you want.
originally from: https://gist.github.com/antonydevanchi/56be1c739e47c72e11ddabf853ddc6db
#!/bin/bash | |
# remove exited containers: | |
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
# remove unused images: | |
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
# remove unused volumes: | |
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <( |
ℹ️ to change the default color of the images replace #6c63ff with whatever color you want.
originally from: https://gist.github.com/antonydevanchi/56be1c739e47c72e11ddabf853ddc6db