You’ll need to maintain an Income-Driven Repayment Plan for 20-25 years. After paying it consistently, the government will forgive the rest no matter the balance remaining. How long you’ll have to pay will depend on the plan you choose.
Here’s a summary of each, according to IBR Info
pay 20% of discretionary income and a 12-year repayment amount multiplied by an income percentage factor. You’ll have to pay for 25 years. It applies to all Direct Loan borrowers with no PFH required.
Pay 10% of discretionary income for 20 years. It applies to all borrowers who took out a loan after Sept 30, 2007, and one other loan after Sept 30, 2011. Must have a PFH
10% of discretionary income for 20 years. Applies to people who took their loan on or after July 1, 2014. Must have a PFH.
pay 10% of discretionary income for 20 years, or 25 years if you are in graduate debt. No proof of partial financial hardship (PFH) is required.