While most negative information must be removed from your credit report after seven years, the Fair Credit Reporting Act allows bankruptcy to be listed on your credit report for up to ten years. It's the credit bureaus' responsibility to remove the bankruptcy after the reporting time limit has passed.
Even though bankruptcy will stay on your credit report for 7-10 years, it won't necessarily affect your credit score the entire time. Many people start rebuilding their credit within 1-2 years after bankruptcy discharge.
If you're thinking about trying to erase bankruptcy from your credit report, think again. Removing a legitimate bankruptcy from your credit report can be difficult (or impossible) since it's a matter of public record. Even removing an inaccurately reported bankruptcy can be troublesome because you have to show the court that the bankruptcy is erroneous.