There is no single best way to clean the sensor of a digital camera. To put it more precisely, which way is better can depend on a number of variables. The most significant variable, by a fairly large margin, is determined by what, exactly, needs to be cleaned from the sensor. The same method that is most effective and safest for removing lightly attached dry dust particles is not the best way to remove a sticky wet substance that has managed to get onto the filter stack in front of the sensor of a camera.
Another consideration that can affect what is the best way to clean a sensor can be summed up by answering the question, "How clean does it need to be?"
A less risky method that is effective enough to shoot 'complex' scenes with lots of detail at wide apertures with long focal length lenses may not be the best answer if the camera needs to be used with wider angle lenses at narrower apertures shooting fairly uniform fields of brightness and color. For the second scenario a more risky but more effective method might be a better choice.
There are more effective methods, and there are safer methods. They are generally inversely proportional to each other. The methods, more or less in order from the lowest to highest risk factor are:
- Automatic dust removal system
- Air blower (with a filtered intake). Be sure to use a blower that doesn't spray dust into your camera's light box. Good blowers have a one-way intake valve with a dust screen to prevent sucking dust into the blower along with the air.
- Dry brush
- Electrically charged brush such as those made by Arctic Butterfly.
- Dry cleaning products, such as the LensPen brand's SensorKlear that use a combination of microfiber and microscopic carbon beads to remove oil and smudges.
- Wet cleaning systems that use swabs and cleaning fluid
- 'Tape' method that uses a cleaning instrument with a sticky surface that attempts to capture hard to remove dust without leaving residue behind.
Can I clean it with a cotton swab and some alcohol for example?
That all depends on what type of alcohol and what type of cotton swab. In general, cotton swabs are not good for cleaning camera sensors because they tend to leave lint behind. Swabs specifically made for cleaning sensors are available that don't leave lint behind. They're also shaped correctly for cleaning a camera's sensor and come in various widths that match specific sensor formats.
In terms of wet cleaning fluids, the most popular sensor cleaning fluid is probably Eclipse made by Photographic Solutions. It is a very pure form of denatured methanol with almost zero impurities. Many types of alcohol used as solvent or cleaners contain impurities that can leave behind residue when they dry. These impurities will leave spots on the front of your sensor (or, more specifically, the front of the stack of filters directly in front of your camera's sensor¹). So using alcohol marketed as a household cleaner probably isn't a good bet, either.
Just bite the bullet and spend $20-30 on a sensor cleaning kit that includes 2-3 swabs and a small bottle of cleaning fluid designed specifically to clean your camera's sensor. Or buy swabs and fluid in bulk and save a little in the long run. That will go a long way towards reducing the chances of damaging your camera's sensor by cleaning it.
Replacing a sensor in a used camera that is not covered by warranty is rarely feasible due to the almost complete disassembly and reassembly required. One of my favorites among the jokes told by Roger Cicala, the founder of lensrentals.com, in reference to the high cost of replacing full frame sensors:
What do you call a D800 with a scratched sensor?
This is due to a sensor replacement for that camera costing near the total value of a used D800. Smaller sensors are not as costly for the part, which is significantly cheaper for a micro four-thirds sensor than a FF sensor, but the amount of labor hours involved is not much different.
¹ Even cameras without low pass anti-aliasing filters, such as the OM-D E-M10 still have a glass cover in front of the sensor in the form of the infrared cut filter. Many also have glass plates where the two plates that make up the horizontal and vertical low pass filters would be. Some, such as the Nikon D800E and D810, even have dual horizontal low pass filters that offset one another.