Following script could help remove all of the docker images starting with a specific prefix. Save the script in a file namely, rmImages.sh. Change the permission using the command such as “chmod u+x rmImages.sh”. Execute the script using the command such as ./rmImages.sh. And, that is it. it would help you delete all the images starting with a specific prefix.
function removeUnwantedImages() { DOCKER_IMAGE_IDS=$(sudo docker images | grep "$imagePrefix" | awk '{print $3}') if [ -z "$DOCKER_IMAGE_IDS" -o "$DOCKER_IMAGE_IDS" == " " ]; then echo "---- No images available for deletion ----" else sudo docker rmi -f $DOCKER_IMAGE_IDS fi } read -p "Delete images whose prefix is: " imagePrefix removeUnwantedImages
Artificial Intelligence (AI) agents have started becoming an integral part of our lives. Imagine asking…
In the ever-evolving landscape of agentic AI workflows and applications, understanding and leveraging design patterns…
In this blog, I aim to provide a comprehensive list of valuable resources for learning…
Have you ever wondered how systems determine whether to grant or deny access, and how…
What revolutionary technologies and industries will define the future of business in 2025? As we…
For data scientists and machine learning researchers, 2024 has been a landmark year in AI…