Delete all labels of a Confluence page.

You need to install the Power Scripts for Confluence app in your Confluence Server/DataCenter instance to implement the below.

The below SIL script will delete all labels from a page in a Confluence Server/DataCenter instance:

//get page number page = getPage("TST", "This is a demo page"); //set the labels to empty string -> which deletes all labels of the page %page%.labels = "";

Replace

  • TST with the key of Space where the desired page exists.

  • This is a demo page with the title of the desired page whose labels you want to delete.

 

Note: If you have utilized these labels in any macro that involves labels (for example, the Content by Label macro), deleting those labels may cause the above page to be excluded from the macro-generated results.

 

Here’s an example showing the above script in action:

 

Reference:

See Other Recipes:

See More Documentation: