Hello Devs,
Currently I was working on Template clean-up tasks where we
had to remove un-used/unreferenced templates from Sitecore.
While removing the templates, I faced one issue where I was
not able to delete some of the templates and was getting below message:
I checked whether template is being referred somewhere using
the links command and it was referring to the Standard Values of the template.
I removed the Standard Values of the Template but still no
success. The reason might be it would be still referenced somewhere in Sublayouts/Base
Templates/Data Source Templates etc.
If you are sure that template is not being used, Sitecore
has one hidden utility which can make your life easier.
Sitecore admin page:
<yoursiteurl>/sitecore/admin/dbbrowser.aspx
It displays the view of the Sitecore database. Its also very
light weight as it doesn’t load the sub-items by-default. This doesn’t run the
normal validations from the main content editor and allows you to delete the
template without any validations.
Finally, I was able to delete templates which I was sure not
being used.
Caution: The Biggest drawback of this tool is you
can’t restore deleted items as it doesn’t store it in Recycle bin.