What is the best way to retire, remove, or expire tags on AEM DAM without majorly affecting the content that's associated with the retired tags?
Views
Replies
Total Likes
Hi @KristenEd1 ,
The best way to retire tags in AEM DAM without affecting content is to move them to an "Archived" namespace (e.g., /etc/tags/archived).
Thanks!
Thank you for the reply. Can you provide a visual or specific steps to do this? I'm not seeing a way to move existing tags into a new top level tag folder if I were to create one called Archive.
Views
Replies
Total Likes
Deleting tags is not a regular authoring activity. Instead, adopt a governance model where tag changes (especially deletion) are planned, controlled, and executed by administrators. Use unpublishing* or merging to “retire” tags so that the legacy content remains accessible, while avoiding the performance pitfalls of updating large numbers of pages in one go.
A more active alternative could be using Query, you can identify the tags referenced on the pages. With the TagManager API com.day.cq.tagging.TagManager, you can delete these tags from the page, and subsequently, they can be removed from /etc/tags/.
* consider marking the tag as deprecated (for example, by renaming it to include “-retired”) so that new content isn’t tagged with it, yet existing content remains searchable.
Hi @KristenEd1 ,
If you want to retire or remove tags without breaking existing content associations, follow these best practices:
Solution 1: Move Tags to an "Archived" Namespace
Instead of deleting tags, move them under an "Archived" folder to prevent new usage while keeping existing content intact.
Steps to Move Tags to "Archived" in AEM
1. Go to CRXDE Lite (/crx/de/index.jsp).
2. Navigate to /etc/tags (or /content/cq:tags in newer AEM versions).
3. Create a new folder:
- Right-click on tags → Create > Create Folder
- Name it "archived" (or "retired-tags").
4.Move old tags:
- Find the tag you want to retire.
- Drag it into the archived folder or use the Move option in CRXDE.
- Ensure the moved tag keeps the same structure (e.g., archived/old-category/tag-name).
5. Save and Replicate:
- Click Save All, then Replicate the changes.
Effect: Existing content tagged with retired tags will still work, but new content will not use them unless explicitly selected.
Solution 2: Mark Tags as "Deprecated" in Tag Titles
If moving tags is not an option, you can rename them to indicate they are retired.
Steps to Mark Tags as Deprecated
1. Go to AEM Tagging Console (Tools > General > Tags).
2. Locate the tag you want to retire.
3. Rename it: Add "-retired" or "(Deprecated)" to the tag name.
Example:
marketing-strategy-retired
4. Replicate Changes (Publish > Replicate).
Effect:
- Tags remain in their original location but clearly indicate they are deprecated.
- Authors will avoid selecting them for new content.
Solution 3: Unpublish Tags from Publish Instances
If you don’t want users to find these tags in AEM Author or Publish, you can unpublish them instead of deleting.
Steps to Unpublish Tags:
1. Go to AEM Tagging Console (Tools > General > Tags).
2. Select the tag(s) you want to retire.
3. Click Unpublish → This removes the tag from publish environments but keeps it in Author.
Effect:
- Content using these tags remains unchanged, but the tags disappear from public searches.
- New content cannot use these tags.
Solution 4: Remove Tags from Assets Using Query + TagManager API (Technical Approach)
If you want to completely remove tags from assets before deletion, use AEM Query Builder + TagManager API:
Steps
1. Run a Query to Find All References to a Tag:
{
"path": "/content/dam",
"property": "cq:tags",
"property.value": "marketing-strategy-retired"
}
2. Use TagManager.untag() API to Remove Tags from all assets.
TagManager tagManager = resourceResolver.adaptTo(TagManager.class);
tagManager.untag(assetResource, "marketing-strategy-retired");
3. Delete Tag from AEM Using CRXDE or Tag Console.
Effect: This removes all references before deleting the tag, avoiding broken metadata issues.
Use Solution 1 (Archive Tags) for best long-term content management.
Use Solution 2 (Rename as Retired) if moving is not possible.
Use Solution 3 (Unpublish Tags) if the tag should disappear from Publish but stay in Author.
Use Solution 4 (Remove References + Delete) for a clean removal with no broken content.
Regards,
Amit
@KristenEd1 Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies