You can try reading Personal Bankruptcy Laws For Dummies. However this is generally so complicated, it's best to hire a bankruptcy lawyer.
Get a bankruptcy attorney
best to retain an attorney. If you try to do it yourself and get it wrong, you'll PAY.
check irs