Your coverage should last until no one depends on your income. This means covering major responsibilities that don't last forever, like a mortgage, raising kids or paying off debt.
Term life insurance works well for this purpose. It gives you coverage for a set number of years at a fixed rate, costing much less than permanent insurance and often saving you thousands.