Not sure exactly what the problem is as the question is a little vague however, I think I understand what you're asking.
Linking a "bunch of different apple id's" is a pain in the ***! As I understand it (from your question), numerous Apps have been installed under different Id's (assuming that each time a new app was required, the password was forgotten and your "ex" just created a new account!)
Unfortunately, there is only 2 ways to fix this:
1. Reset the phone to factory settings and start from scratch - log in to the app store and it will list all apps associated with the apple id and just download them all again.
2. Everytime you try to use an App that asks for a password associated with a different ID - delete it and then re-install using your new ID.
The problem is that whatever ID was used to install the app originally is the ID that must be verified everytime you try to update or change it.
There is no easy way sorry!