Generally, student loans are not discharged in bankruptcy. In 11 U.S.C. sec. 523(a)(8) there are two exceptions to this general rule:
The student loan may be discharged if it is neither – Insured or guaranteed by a governmental unit, nor
Made under any program funded in whole or in part by a governmental unit or nonprofit institution.
The student loan may be discharged if paying the loan will “impose an undue hardship on the debtor and the debtor’s dependents.”
Student loans more than 7 years old used to be dischargeable under certain circumstances, but this provision was removed by an appropriations bill passed in October of 1998.
Whether an exception applies depends on the facts of the particular case and may also depend on local court decisions. Even if a student loan falls into one of the two exceptions, discharge of the loan may not be automatic. You may have to file an adversary proceeding in the bankruptcy court to obtain a court order declaring the debt discharged.