A bankruptcy can stop an eviction, but it depends on whether or not it is a "skeletal" bankruptcy or a bona fide filing. A "skeletal" bankruptcy is one that is done with the bare-bones documents in order to get it on file. That is, the Petition, the list of three main creditors, the credit counseling certification and the Declaration regarding the Debtor's Social Security number. In a bona fide filing, these documents would be filed, but also the filing would include Schedules, which are detailed documents reflecting the true financial picture of the Debtor. In a Chapter 13, the Debtor also has to file a proposed Plan of Reorganization. It is a lot of work.
Many times, Defendants in an eviction action will file bankruptcy in order to delay the unlawful detainer/state court proceedings. If the Debtor has filed bankruptcy more than twice within a year and a half, the Debtor is not afforded the protection of the automatic stay. This is why I always have a search done of the bankruptcy docket to see how many times the Debtor might have previously filed -- especially if the eviction is taking place due to a purchase under a Trustee's Deed Upon Sale. When a bankruptcy petition is filed, the Trustee automatically calendars a two week tickler for the completion of the Schedules. If those Schedules aren't filed before the two weeks are up, the bankruptcy is automatically dismissed. Some debtors will also request an extension of time to file the Schedules and this will buy them another two weeks of delay. This way, the Defendants have bought themselves a full month.
The Bankruptcy Courts have been overrun with bogus, sham filings in order to delay legal actions. These filings are clogging up the court system. It is very expensive for the Plaintiff to hire bankruptcy counsel to file a motion for relief from the stay.
When a bankruptcy is filed, there is a 30-day automatic stay that goes into place. A Motion for Relief from Stay can be filed by a bankruptcy attorney, and sometimes they can go in on shortened time and get the motion heard and an order obtained for relief within a two-week period of time. This is quite expensive, as I've stated already. Many times, the Plaintiff will just wait to see if the Schedules are filed and if not, whether the Trustee has dismissed for failure to complete the filing. However, if you see that the Debtor has filed over 45 pages of documents, you know that the Schedules have been filed and that you need to file a Motion for Relief from Stay.
Another new tactic is for the Defendant to file bankruptcy the same day as the filing of the Unlawful Detainer Action, or to file before the Unlawful Detainer action is filed, thereby having a stay in effect when the unlawful detainer is filed. According to the law, the Debtor doesn't have to give notice to the Plaintiff that he has filed for protection in bankruptcy. Even if the unlawful detainer action is filed THAT MORNING and the bankruptcy is filed after it on the same day, the stay is effective for the whole day and the Unlawful Detainer action cannot go forward and Plaintiff is precluded from proceeding. This seems very unfair, but it is the law. I am now doing bankruptcy searches before filing my unlawful detainers if they involve property purchased in a trustee's sale.