Skip to content

Instantly share code, notes, and snippets.

@thedoc31
Created October 3, 2022 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedoc31/c3dd98ed1cb0bf7ec4835c168824a25d to your computer and use it in GitHub Desktop.
Save thedoc31/c3dd98ed1cb0bf7ec4835c168824a25d to your computer and use it in GitHub Desktop.
AEM QueryBuilder query to identify old packages stored below /etc/packages
# Query below will return packages not created, unwrapped, or unpacked by admin since the 'upperBound' date.
# Anything older than the upperBound date will be included. Anything newer is ignored.
# If Querybuilder returns blank results or stops processing because it traversed >100k nodes, you may want to consider
# adding the oak_index_ntFileLucene in one of my other gists. Otherwise, narrow the parameters such as using path=/etc/packages/my_packages.
path=/etc/packages
type=nt:file
p.limit=-1
p.hits=full
daterange.property=jcr:created
daterange.upperBound=2021-09-20
0_property=jcr:createdBy
0_property.value=admin
0_property.operation=unequals
group.1_property=lastUnwrappedBy
group.1_property.depth=2
group.1_property.value=admin
group.1_property.operation=unequals
group.2_property=lastUnpackedBy
group.2_property.depth=2
group.2_property.value=admin
group.2_property.operation=unequals
group.p.or=true
p.and=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment