docker remove dangling image code example
Example 1: how to delete dangling docker images
sudo sh -c 'docker rmi $(docker images -f "dangling=true" -q)'
Example 2: docker remove dangling images
docker image prune
sudo sh -c 'docker rmi $(docker images -f "dangling=true" -q)'
docker image prune