Deleting labels from deleted templates
Asked by Kellie Finch:

I was creating some templates that I tagged with labels. I then deleted those templates and no longer want to use the labels that I attached to them. I've removed the labels from all the pages I created that had them, and there are no instances of that label on any pages. However, the label is still showing up in the list of labels. I've purged the trash and it's still showing up. The only thing I can think of is that they were still attached to the templates when I deleted them. Is there any way to permanently delete these?


Answers:
author: Max Foerster - K15t
body: Hey [@Kellie Finch](/t5/user/viewprofilepage/user-id/4813767),

are you 100% sure that there are no pages or attachments left with that label? Can you check with the content by label macro if anything pops up?

Best, Max

comments: author: Kellie Finch
body: I'm pretty positive there is nothing attached with that label. I ran the content by label macro and it says there is no content with that specified label.


author: Max Foerster - K15t
body: Hey Kellie,

to make sure:

* You purged the trash with the templates
* The labels are not used in the space
* The global search does not return any pages or attachments with the label?

There are apps available on the Marketplace called that may be worth a try to figure this out:

[Atlassian Marketplace search for Confluence Server apps - keyword "Label"](https://marketplace.atlassian.com/search?hosting=server&product=confluence&query=label)

Best, Max


author: Kellie Finch
body: Hi Max,

I purged the trash, but I don't know if the templates go to the trash or not. I deleted the templates I created from the templates tab in content tools, and those templates are no longer there, but I don't know if it went to the actual trash.

Based on the results of the content by label macro, it's not bringing up any results with that label, but if I run the label list macro it shows up as if it's still being used in the space, but I cannot find any content with that label.

I did a global search of the label, and it's not on any page within any space.

Third part apps are not an option, unfortunately. In any case, there really should be a fix for this without having to integrate an app.

-Kellie


author: Max Foerster - K15t
body: Hey Kellie, I looked at this topic again, and "ghost labels" seem to be an issue for a long time in Confluence server, but you should be able to resolve that. I leave some documentation here for you. This bug ticket was interesting to read and sent me down the rabbit hole. :D

[CONFSERVER-6520 Labels are still not being deleted when no longer used.](https://jira.atlassian.com/browse/CONFSERVER-6520)

I then found this one:

[CONFSERVER-36423 Detect and Remove Unused Label through UI](https://jira.atlassian.com/browse/CONFSERVER-36423)

There you can find a recommendation for an app from the marketplace. I think you should start a trial and see if you can fix your issue with it. If that doesn't help, there is this community question diving into how to remove the label from the database as a last resort:

[Obsolete labels showing up in Labels list](https://community.atlassian.com/t5/Confluence-questions/Obsolete-labels-showing-up-in-Labels-list/qaq-p/725754)

Get rid of it! ?

Best, Max


author: Kellie Finch
body: Thanks, Max! That's a shame there's no logical fix for this. But I will look through the sources your provided and see if I can find something that will work for now.

Thank you!

Kellie


Tags: confluence-server

label

server