You can use this add-on to tidy up post content.
This is a direct port of the original Post Content Find / Replace add-on for XF 1.x. You may wish to search the original resource discussion for solutions to common tasks performed with this add-on.
xenforo.com
Or if you are comfortable running direct queries, you can do that instead, but you would have to ensure you remove the opening and closing tags, without affecting valid bb code.