Hi @key-key,
If you don't mind deleting the pages by hand (if there aren't many) you can use the following SQL-2 query in CRX (by going to Tools.. > Query and changing the language to JCR SQL 2) and just click and delete each result (you'll have to adapt the date in the query):
select * from[cq:Page] as page
inner join [cq:PageContent] as content on ischildnode(content, page)
where content.[cq:lastReplicated] is null
and page.[jcr:created] < CAST('2020-05-18T00:00:00.000Z' AS DATE)
If you need to delete the pages programmatically, I suggest creating a workflow. This sounds like the sort of thing you might do every year? Or more often even, if you wanted to. With a workflow, you can develop it once and then just launch it any time you want 🙂
You can create a workflow using the techniques in this tutorial. The workflow should:
- Programatically find the date n - 1 year
- Run the query
- Delete each resource that is returned
Hope that helps 🙂