Correct way to uninstall a plugin and remove all uses on pages in confluence


My confluence instance has an old plugin which is not compatible with the actual and future confluence versions. All of the functionality of the plugin can now be done with Confluence standard functionality.

But there are a lot of pages using the old plugin. My question is how to change the old pages. On ~600 pages one module is used and this should be deleted with content (rest of page has to stay).

On ~1000 pages the module container should be deleted, but the content of the module should stay.

1600 pages is to much to edit by hand, so I need an automatic way.

I wrote some MySQL commands which do these jobs. But one small error on a page and I destroy the whole page content (by destroying the storage format), so manipulating the database directly sounds problematic.

How did you uninstall plugins and remove the used modules on pages?

Is there a way to do this programmatically with an addon? Is there a way to check all confluence pages for their storage format so I can be sure my scripts worked fine on every page?

I hope someone of you had the same problem earlier and can help me.




3 answers

1 accepted

0 votes
Accepted answer

Ok, I summarize: There is no way to clean up an old plugin.

I have to manipulate the database directly and have to take care for functional scripts.

So, what I did is to get all bodies of pages my script changed and tried to paste them into "view source"-macro of a page as one. Then apply the changes and confluence check the page syntax. I got no errors so I hope all is fine.


I have never had to do something like this but I don't think there is any other way to remove this plugin from pages except to go page by page and delete the code. You can do this with the API or like you did with the MYSQL commands but you are right that one little mistake and the page breaks. I would suggest making a back up of the instance and then running your script. Worse case you just revert to the back up if things break.


There is this search and replace plugin but it essentially does the same thing you were doing but it does give you a list of pages where a specific macro exists:

+1 on doing the backup as a regular good practice before doing anything you are concerned about may affect your production instance. The other consideration is trying whatever approach you wish to on a test or staging version of your Confluence instance. For example, we typically install new or significant updates of plugins on our test/staging version to review impact for both technical and practical reasons.

Yes, I have a testing instance for sure where I tested my scripts. They work - but only for all pages I had controlled.

Is there some kind of "Integrity Checker" in Confluence like in JIRA to check all pages for a valid storage format?

think a lot before you install a plugin and give it to your users - if I remove plugin I search and replace it on database level, but it´s tricky

Do you know a trick to check all pages for valid storage format?

In JIRA there is something like "Integrity Checker". Is there something equal in Confluence?

only for macros - like search for: macroName:excerpt-include*

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

783 views 33 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you