# 컨테이너, 이미지 모두 삭제 (실행중인 컨테이너 제외)

sudo docker system prune

 

# 구동중인 모든 도커 컨테이너들을 중지시키고, 삭제

sudo docker stop $(docker ps -a -q)
sudo docker rm $(docker ps -a -q)

# 모든 이미지 삭제

sudo docker rmi $(docker images -q)

# Exit 상태의 모든 컨테이너 삭제하기

sudo docker rm $(docker ps --filter 'status=exited' -a -q)

 

 

+ Recent posts