Student loans cannot be discharged when you file for bankruptcy. There can be two cases of exemption to this rule under 11 U.S.C. 523 (a) (8) and they are that a student loan can be discharged if it is neither guaranteed by a governmental unit or insured. It can also be discharged if it has not been made under a funded program by a governmental unit or a non-profit institution. The court can also decide if a student loan can be discharged in the case of the loan payment causing undue hardship on the debtor or his or her dependents. In some cases, student loans that were more than seven years old could be considered for discharge under specific circumstances but the provision was removed recently as a result of a bill of appropriations that was passed in 1998.