With Sitecore XM Cloud, items can be used as resources, as detailed in the official documentation. If a template is inadvertently modified, its source will change from resources to database. This change can be observed in the template section by enabling the source view from the view menu.

enter image description here

The challenge arises when you need to revert the item source from database back to resources, especially when there are numerous content items already created based on the affected template. The goal is to achieve this without resorting to a workaround that involves moving content to a different template, deleting the existing one, and replacing it.

Given this scenario, what is the ideal method to revert the item source from database back to resources, ensuring the synchronization in the next deployment? If anyone has expertise in this area, please provide your recommendations.

2 Answers 2


You can use the cleanup command to revert item source from database back to IAR.

dotnet sitecore itemres cleanup --path "{{itempath}}" -f -r

This will perform the cleanup from the path specified recursively. You can find more details for the same here.


Hope this helps!!!


The dotnet sitecore itemres cleanup command is the best way to bulk clean up your content tree.

But as an alternative, if you only have a few known items that have been changed, simply deleting the items in the tree will remove the database entries and revert that item back to the IAR version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.