How to remove multiple docker images for a specific pattern

docker images
In my case I want to remove all images which have the beta tag. to do that
use
docker rmi $(docker images --filter "reference=nextcloud/*:beta" -q)
you can modify the reference part according to your use case.
Ciao!