Sensor cleaning in order. Do one step and check, if it was not successful go to the next step:
- Activate the on sensor dust removal: Menu>Wrench>4>Dust Removal. Do this multiple times if you have a lot of dust or have not run it for awhile. I also recommend turning it ON for start up action so that it runs each time you turn on the camera..
- Use a rocket blower to dislodge dust. Menu>Wrench>4> Sensor Cleaning. This flips up the mirror and exposes the sensor. Using the rocket blower, first blow a few times into the air, then gently onto the sensor. This should dislodge dust particles. Turn off the camera to reset.
- Do a wet sensor cleaning. There are various kits available for this. The one from Pentax is highly recommended but so are others. Menu>Wrench>4> Sensor Cleaning. This flips up the mirror and exposes the sensor. Do the wet cleaning per instructions in the kit and then turn off the camera to reset.
- Send the camera in for professional cleaning. If you have tried everything and still have problems then it is time to seek professional help.
I don't ever recommend using canned air, though the idea above with the brush is interesting. Don't blow onto the sensor with your mouth (you will spit on it) or use canned air directed onto the sensor.