The best way to stop minerals from hard water from clogging your dishwasher is to soften the water. To do this, you'll need to install a water softener. Besides that, try running the dishwasher with a cup full of vinegar on the top rack. The acid from the vinegar will cut through the hard water buildup and keep your dishwasher running smoothly.