4

clean-docker.sh

 2 years ago
source link: https://gist.github.com/kousher-alam/fe9fa9a23df3b84f4dffa3427f592887
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

clean-docker.sh · GitHub

Instantly share code, notes, and snippets.

clean-docker.sh

#!/bin/bash # Remove all stopped containers docker rm $(docker ps -a -q) # Remove all containers docker rm -f $(docker ps -a -q)

#------------------------ # With sudo #------------------------- sudo docker rm $(sudo docker ps -a -q) # Remove all containers sudo docker rm -f $(sudo docker ps -a -q)

# System Prune docker system prune


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK