Like a lot of things in law, the answer to this question is “depends.”
Most consumers wishing to shed unsecured debt through bankruptcy (e.g. credit card debt, medical bills, etc.) opt to use the Chapter 7 form of bankruptcy. Chapter 7 bankruptcy is known as a liquidation type of bankruptcy in that after you file, you place all of your assets in trust with the bankruptcy court and the court determines what, if anything, can be sold (liquidated) in order to pay back your creditors. If you own relatively few assets and just rent an apartment, then the court appointed trustee is likely not going to take your playstation and Boyz II Men CDs and sell it at a yard sale. But if you have a large asset like a house, then the court very well may put it up for sale.
The question of whether the court will sell your house in a Chapter 7 bankruptcy depends on whether you have equity in the house. If you have no equity in the house, then it wouldn’t make sense to sell it as all of the money from the proceeds of the sale would go to your mortgage holder(s) leaving nothing left to pay to your creditors.
But even if you do have equity in your house, it does not necessarily mean that you cannot file for bankruptcy under Chapter 7. In every state, there are certain exemption amounts that can be applied to your assets. Exemptions are basically those assets defined by state law that the court cannot liquidate in order to pay back creditors. In California, you can exempt between $75,000 to $175,000 dollars in your equity share which depends on whether you live alone or with a family and whether you are elderly or disabled. If the amount of the exemption meets or exceeds the amount of equity you have in your home, then the court will not sell it.
For example, say you live in a home with your wife/husband and children and the house is worth $400,000 with $320,000 remaining to be paid off. Here, you have $80,000 in equity. Using the California exemption scheme, a home that has a family living in it is entitled to a $100,000 exemption amount. Because the exemption amount ($100,000) is greater than the equity ($80,000), the court will not sell your house as there will be no exempt assets they can get in order to pay back your creditors.
If after applying the exemption amounts you find that you still have a small amount equity remaining in house, then it becomes a little bit trickier to predict what will happen if you file for bankruptcy. If you have a very small amount of equity, it is not guaranteed that the court will sell your house. Because with the closing costs of a home sale (broker fees, title checks, etc.) which can be around 10 percent of the sale price, the court could still find itself with nothing to pay back the creditors with. And even if the court can only net $1,000 from the sale of a house, it is very unlikely they will go through the trouble of selling the home. In situations where it is a close call on how much unprotected equity you have, it is best to have the home appraised and consult an attorney.