Like all things that use combustion, pilot lights can get clogged up with soot and carbon residue and need to be cleaned periodically. If you've noticed your fireplace, thermostat or wall heater pilot light won't stay lit, a dirty pilot light may be to blame. Ideally, you should clean your pilot light once a year to prevent it from getting dirty enough that it goes out, as that could result not only in your furnace or fireplace not working but also dangerous gas leaking into your home.
Turn Off the Gas
The most important part of the process is turning off the gas valve near your furnace. Wait at least five minutes before moving on to the next step in order to ensure the gas completely escapes the pipe and burns out in the pilot light.
Access the Pilot Light
Depending on the type of pilot light you're working on, you may or may not be able to remove it to clean it. Either way, before you start working on it, you'll need to locate it. You may try looking at an owner's manual or look up the model number online if you can't see where it's located after looking at the appliance for a while.
Once you've found the pilot light, evaluate if it's easily removable. Again, the owner's manual or an online search may help with this if you aren't certain. Fireplace pilot lights and thermocouples should only be removed by a professional, but a furnace pilot light can be more easily removed by taking off the bracket holding the pilot light and thermocouple in place and, with a wrench, loosening the nuts holding the two in place. In some units, you may not be able to remove these pieces completely, but you can still physically remove the supply line, and you should do this before cleaning.
Cleaning the Pilot Light
Whether you remove the pilot light or not, you'll want to use a brush to scrub off carbon buildup and soot from the tip. Some sources recommend using a wire brush for cleaning the pilot light, while others say that these can be too firm and may damage the pilot light. Use your best judgment and care to ensure you don't damage the pilot light. If you do bend or dent it, call a professional to evaluate the problem. Because the thermocouple is less delicate, you probably won't have any problems using a wire brush to clean it. If it has any debris that's particularly difficult to remove, you may try gently using a metal file to remove it. If you do damage the thermocouple, you should still call a professional.
Next, use canned air or an air compressor to blow inside the pilot light and thermocouple in order to remove any soot you couldn't access with a brush from the outside. When cleaning a fireplace, also blow air down the supply holes along the line that sits under the logs. If you were able to remove the parts, use a towel to remove any extra dust from the outside before putting the assembly back in the furnace.
Put the pilot light and thermocouple back in place if you removed them and reattach the supply line if you disconnected it. Once everything is cleaned and properly connected, turn the gas back on and relight the pilot light according to the manufacturer's instructions (this process will vary depending on the appliance type, age and model).
When relit, the pilot light should burn with a blue or blue and white flame depending on the gas type. If more than just the tip of the fuel is yellow, adjust your fuel feeds. If this doesn't work and the flame is the wrong color or if you have trouble lighting the furnace, turn off the gas and call a professional because something beyond just a dirty thermocouple or pilot light is to blame. If you smell gas, turn off the appliance immediately, go outside and call a professional. Don't go back inside unless the professional instructs you to do so.