I have taken groovy script code from the below article and modified according to your reuirement, but did not test this code, you need to test this in the local before running into production or QA.
https://hashimkhan.in/aem-adobecq5-code-templates/groovy-script/
def predicates = [path: "/content/dam/geometrixx", type: "dam:Asset", "orderby.index": "true", "orderby.sort": "desc"]
def query = createQuery(predicates)
query.hitsPerPage = 500
def result = query.result
println "${result.totalMatches} hits, execution time = ${result.executionTime}s\n--"
result.hits.each { hit ->
def path=hit.node.path
String nodePath = node.path;
if (hit.node.hasProperty(propName)) {
count ++;
println 'deleting--'+nodePath ;
node.remove();
/* Save this session if you are sure the correct nodes are being deleted. Once the session is saved the nodes couldn't be retrieved back.
*session.save();*/
}
}