Federal law discourages debtors from filing for bankruptcy too easily. You can't make it a repetitive event, resorting to it whenever the chips are down. But the law also recognizes that sometimes bad luck comes in waves. You might catch your breath from one bad break, then another piles on. You can file for Chapter 7 a second time, but you must wait a while. How long depends to some extent on your circumstances.
If your first Chapter 7 bankruptcy went as planned and your debts were discharged, you must wait eight years before you can receive another discharge. Discharge means your bankruptcy proceeding ran its course, reached completion, and you were relieved of any obligation to pay your debts. If your first bankruptcy was a Chapter 13, however, you must only wait six years, and if you paid off at least 70 percent of your secured debts through your Chapter 13 plan, this requirement may be waived. You only have to wait four years after a Chapter 7 discharge to file for Chapter 13.
The situation becomes less clear-cut if your Chapter 7 case was dismissed by the court so your debts were not discharged. If the court dismissed your case because you acted in bad faith, you can file again in six months, but you won't get the full benefit of the automatic stay that prohibits creditors from trying to collect from you while you're in bankruptcy. They can continue pursuing you for payment of your debts until your debts are discharged.