grep -l <text> * | xargs rm
A safier solution:
find . | xargs grep -l email@domain.com | awk '{print "rm "$1}' > doit.sh
vi doit.sh // check for murphy and his law
source doit.sh
Another solution:
find . -exec grep -q 'text' '{}' \; -delete
It can be preliminary checked as:
find . -exec grep 'text' '{}' \;
The \
character in text
should be doubled, e.g.:
find . -exec grep 'Magento\\Framework\\App\\Http::handleBootstrapErrors(): Failed opening required' '{}' \;