how to sell car with lien??

Ive registered a car with someone else’s Lean on the title, didn’t become a problem till I smashed it up and the Insurance company Insisted on the Lean release, and I didn’t even know the original Lienholder. had to go back 2 owners to find out who it was then get him to get the lien release to give to insurance company (thank goodness all the pre-Owners where super nice and helpful that would have been a nightmare.)