As Ubasses indicates, you remain 'jointly and severally' liable for the debt. That means that if your ex was to default on the payments the lender could (if they so chose) pursue you for the money (either alone or together with your ex).
The lender will only offer a new mortgage to your ex if he meets their stringent tests for one (including, obviously, the level of his disposable income). If he doesn't (and you're to prepared to keep your name on the mortgage) then the property will have to be sold, either voluntarily or through you taking legal action to force him to sell.