There’s no single number that fits every household. A kitchen line behind a heavily used disposal earns more frequent attention than a guest bathroom that sees light use. What matters more than a fixed schedule is watching for the early signs: draining a little slower each month, an occasional gurgle from another fixture, or a faint odor near a floor drain. Any one of those is worth a look before it becomes the kind of blockage that needs an emergency call instead of a scheduled one.
For a main line specifically, a camera inspection every few years is a reasonable habit in an older section of any city, and it tells you plainly whether cleaning is cosmetic maintenance or whether something structural is actually narrowing the pipe. A kitchen line behind heavy disposal use is usually the branch that needs the most frequent attention, more than a rarely used guest bathroom, simply because of what’s actually going down it week to week.