If you file for bankruptcy protection and relief, the case information is allowed to remain on your credit report for up to 10 years – but this is often times not the case.
Something important to consider when filing bankruptcy is the immediate fresh start you receive from a bankruptcy discharge which allows you to rebuild your credit with no debt burden.
Alternatively, if you choose not to file for bankruptcy, and simply continue to make partial payments or miss payments on debts owed for years and years, this information is allowed to remain on your credit for 7 years after the debts have been paid off (and longer if you have received a judgment!).