-
Delete docker Images with "" as a tag name.
- Command :
docker rmi -f $(docker images | grep -w "<none>" | awk {print $3})
- Command :
-
Delete "Dead" or "Exited" containers.
- Command :
docker rm $(docker ps -a | grep "Dead\|Exited" | awk '{print $1}')
- Command :
-
Delete dangling docker images.
- Command : ``docker rmi -f $(docker images -qf dangling=true)```
-
Delete docker images older then one month.
- Command :
docker rmi -f $(docker images | awk '{print $3,$4,$5}' | grep '[5-9]\{1\}\ weeks\|years\|months' | awk '{print $1}')
- Command :
-
Delete or clean up unused docker volumes.
- Command :
docker rmi -f $(docker volume ls -qf dangling=true)
- Command :
-
Notifications
You must be signed in to change notification settings - Fork 7
vladwa/docker-cleanup-script
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Docker cleanup shell script.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published