We always had our (brown) carpet professionally cleaned once a year. Used Chem-Dry for the first few years, but switched to steam cleaning for most of the years. House and carpet were 4 years old when we bought the house, so the carpet was 34 years old when we replaced it. Oh lord, it was like a beach under the pad. Amazing how much dirt carpet hides. We put in laminate, and now we SEE how much fuzz/hair/dirt was being caught in the carpet. We have to sweep every week and get piles of stuff.
So not sure there IS a way to really keep carpet clean, short of not using the room it is in. I say that because when I sold my parents house, the original, 53 year old wall to wall carpet was still there. It was high quality nylon pile, and there was no wear, just staining in the traffic areas. But the living room, which only got used for special occasions, everyone remarked how the carpet looked brand new.
I know in commercial buildings, they just plan on replacing carpet every few years because you can't keep it clean. My office has the carpet steam cleaned once a month, and they replace it every 4 years.