Bankruptcy trustees must approach the discussion/realisation of a bankrupt's interest in their home with tact and understanding, while protecting creditors' rights and interests.
If you rent, no you will not lose your home. If you own your home, then your interest in the home is an asset of the bankrupt estate. Often the home is an asset jointly owned with a non-bankrupt spouse or partner. In such cases, the non-bankrupt joint owner will usually have the opportunity to acquire your interest in the home from the bankruptcy trustee. If that cannot be achieved, then it is likely that your home will be sold.