How can i delete someone's old email account off my unlocked iphone 7?

I can't update any apps becasue that persons email comes up and it asks for a password, this is a unlocked iphone 7, that I purchased for a company a family member works for [they sell the phones when an upper management quits instead of reusing them] it recognizes all my apple accounts just fine, yet when i click to update the apps, which there are 6 now, a request to log in comes up with the prior users email address which is a business and no longer exists. Is there a way around it? The phone was set back to factory by the phone company that the company uses, they also don't know how to get rid of it. They say they have not had this issue before.

Restore it completely