Till the age someone is financially dependent on your income. Ideally 60-65, no more.
What really is term cover?
A term cover is an income replacement plan. It should be covering you, till you've dependents who're reliant on your income, and miss it if something were to happen to you.
This money would never be yours. It's meant for your family, in the event of something highly unlikely.
How does it matter?
It matters because for most people with income from salary or contract work; it'd be hard to sustain their income after age of 55-60.
At that point, they'd ideally have enough savings or investment corpus, or annuity or pension to take care of their day to day expenses , for the rest of their remaining life.
It's hard to imagine one having to support their immediate family members financially, after an age of 60.
While most term insurers offer insurance coverage up to age of 70-75, or even 80 years of age; it only serves to increase the premium.
You shouldn't have to buy a cover for a scenario, and pay extra in premiums; when you don't even need it.
Optimally, a term cover up to age of 55-60 makes sense.
Ideally, if you reach a state where your savings + investments far exceed the cover amount (for example, by more than 2x-3x); then it makes sense to cancel the policy and stop paying further premiums. In the event of your demise, your nominee(s) would simply inherit your corpus.
If you plan well, you would actually make the term cover moot well before your retirement
In a well run plan, you would start creating assets soon enough. Even if you have a few years of earning/investing left, your corpus may be sufficient to take care of all the financial goals that outlive you. When you reach this state, you don't require term covers. Example: Say you have two financial dependents and are building a retirement corpus for the three of you. There may be a few more years required to build the corpus for all three, but you would have built the corpus for the two dependents earlier. You can then cancel the policy.