The exact game plan will vary depending on what type of machine you own.
For the 2.0 and plus series:
Start by making sure your machine is turned off and the water reservoir is empty. If your machine has a water filter, remove it and set it aside. For brewers with a removable reservoir, pour a full bottle of Keurig’s own specialized cleaning solution ($10, amazon.com) or 14 ounces of white vinegar into the reservoir. Next, pour 14 ounces of water into the reservoir as well. Now for the cleaning cycle: turn the machine on and put a mug on the cup tray. Make sure the pod tray is empty, then select an 8 ounce brew size and press the brew button (if your machine doesn’t have an 8 ounce setting, use the next largest size). When the brew is done, pour the contents of the mug into the sink. Repeat the cycle until your display reads “more water please,” then let the brewer sit for 30 minutes with the power on. After that time is up, remove and empty the water reservoir and clean it well to get rid of any residual solution. Return the reservoir to the brewer and fill with water to the maximum line. Now repeat the cleaning cycle at least twelve times.
For the K10 or K15 mini model:
Pour one third of the Keurig cleaning solution (or approximately 4.6 ounces of vinegar) into the water tank, then fill the reservoir up to the 10 ounce line with fresh water. Lift the handle and wait a few seconds for the water to drain. Press brew to complete the cycle. Next, repeat the cycle (using 1/3rd of the bottle and fresh water), but this time power the brewer off just as it starts to dispense. Wait 30 minutes and then power the brewer on again. Lift the handle and lower it, then press brew to complete one more cleaning brew. Finish by running three cleaning cycles, each with just 10 ounces of fresh water.