I’m going to answer your question assuming that you are not on title of the home and that you merely co-signed the mortgage with another person.
If you are on title of the home and you want to remove your name before filing for personal bankruptcy, my answer will be completely different….
Whether you can take your name off your mortgage will depend on your bank. If the bank feels that the other person on the mortgage has the financial ability to carry the mortgage payments herself, then removing your name shouldn’t a problem. However, if it’s the bank’s view that your co-signor won’t be able to carry the mortgage on her own, then they will not remove your name unless she can get another co-signor to replace you that’s acceptable to the bank.