docker tidy unused image and container

If you were using docker for a while, there maybe huge disk waste by docker. because there were so many unused docker images and stopped container.

The powerful command

docker system prune -a -f

You need tidy them to release your disk space. you should clean unused container first, then clean unused images

To clean unused container

docker ps -a | grep \"Exited\" | awk '{print $1}' | xargs docker rm -vf 

to clean unused images

docker images | grep \"^<none\" | awk '{ print $3 }' | xargs docker rmi 

发布于: 1555472282, 点击数:

Tumblr
Pinterest
LinkedIn
Reddit
XING
WhatsApp
Hacker News
VK
Telegram