A bankruptcy filing does immediately stop the foreclosure process. Lenders can't foreclose or even try to collect debt until permitted to do so by the court. But a Chapter 7 bankruptcy only delays foreclosure. Borrowers almost always lose their homes in a Chapter 7. Chapter 13 is usually more effective at helping people keep their homes. But it requires you to pay back your mortgage debt over a 3 to 5 year period.