All of the possible answers began with you lease and how tenancy is defined. You should contact an attorney familiar with property code for guidance
Generally if both parties are on the lease as financially responsible parties one of the parties cannot be removed from the lease unless all parties agree. Otherwise a single party or both parties would have to be evicted for a lease violation. Which can be pretty tricky unless it’s non-payment of rent.
If all parties agree to terminate the existing lease I believe you would need to do a walk through and could charge for typical security deposit deductions and would need to refund the rest to both parties Then create a new lease with new deposit
I’d be interested to hear what other landlords thing about this. Also, Stick Dissosway has a landlord mastermind on Meetup and you could also post there to get advice