Retiring Tags on AEM DAM | Community
Skip to main content
March 14, 2025
Solved

Retiring Tags on AEM DAM

  • March 14, 2025
  • 3 replies
  • 756 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by giuseppebaglio

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.

3 replies

Level 2
March 14, 2025

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!

March 14, 2025

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.

AmitVishwakarma
Community Advisor
Community Advisor
March 14, 2025

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

 

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

kautuk_sahni
Community Manager
Community Manager
April 1, 2025

@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!

Kautuk Sahni