#!/bin/bash
for it in $(find . | grep "target$")
do
  echo "$it"
  rm -r "$it"
done