10 lines
282 B
Plaintext
10 lines
282 B
Plaintext
|
#!/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 -f
|
||
|
# remove unused volumes:
|
||
|
docker volume prune -f
|
||
|
|