If you're switching between .22 and .223 in the same upper, the recommended procedure is to fire a few rounds of .223 for every couple hundred rounds of .22 to blow the gas tube clean of any lead or carbon buildup, and let the jacketed rounds scour most of any lead deposits out of the rifling. Before I switched to a dedicated .22 upper (which has no gas port), I'd fire about five rounds for every brick/milk carton of .22.
Some buildup/blockage does occur, since it would often turn out that the first round or two of .223 wouldn't cycle the rifle at first after shooting a lot of .22. I'd single-load and fire each round of .223 with an empty magazine inserted, and consider it "blown clean" when the bolt locked back.