How long a bankruptcy stays on your credit report depends on which chapter of bankruptcy you filed under.
If you file for Chapter 7 bankruptcy to completely erase your debts, the bankruptcy filing stays on your credit report for 10 years. If you file for Chapter 13 bankruptcy, which is a repayment plan for your debt, it stays on your credit report for 7 years. Both of these time periods start running on the day you file for bankruptcy.
Once these time standards have been reached the bankruptcy automatically drops off your credit report without you needing to file anything.