Interesting question and like so much in life, "it depends"--like with how long does it take for the most recently eaten meal to come out the other end? well, don't remember exact number of hours, but I very loosely figure morning meal waste comes out in evening, for example. And maybe longer (when my pup was a wild young thing, despite my watching, when my back was turned yea those few minutes, she grabbed a saran-wrapped snack aimed for my handyman off countertop; in a panic, called vet, and he said watch the stool for next day or so, and the last of the saran came out enmeshed with stool the next day.) Okay, that's it for waste as stools. But metabolically, no idea how long it takes for the assimilated-into-bloodstream effect to be totally used up/eliminated by kidneys and liver (I'm ashamed, should be able to figure that out, just not taking the time!)--probably a good day or so at least.
However, for the itching part......try elimination diet/changing to a quality dog food (see all the posts on this always-popular query) that does NOT have the common allergy-causing effect--common cracked corn, wheat, soy often bother. But I also believe it is usually necessary to add a supplement such as an oil-rich capsule or liquid, high in the correct omega oils......K-V vet catalog is good reference; for years I used I think it was Vita-Plus from Drs Foster&Smith. (but their prices went up so much, I discovered KV Vet, just a comparison note: for two other exact same name-brand products, it was a savings of $30-plus dollars!--you get free S&H if order is $50, not a problem since I'll always be using those items and I order enough to get the free s&h, sorry to digress!)
another consideration if itching like crazy, even one flea bite can cause awful fleabite dermatitis, and fleas can overwinter in the house........
well, good luck!
However, for the itching part......try elimination diet/changing to a quality dog food (see all the posts on this always-popular query) that does NOT have the common allergy-causing effect--common cracked corn, wheat, soy often bother. But I also believe it is usually necessary to add a supplement such as an oil-rich capsule or liquid, high in the correct omega oils......K-V vet catalog is good reference; for years I used I think it was Vita-Plus from Drs Foster&Smith. (but their prices went up so much, I discovered KV Vet, just a comparison note: for two other exact same name-brand products, it was a savings of $30-plus dollars!--you get free S&H if order is $50, not a problem since I'll always be using those items and I order enough to get the free s&h, sorry to digress!)
another consideration if itching like crazy, even one flea bite can cause awful fleabite dermatitis, and fleas can overwinter in the house........
well, good luck!