Proper maintenance is required to keep any gun in working order and at the ready. The first step is always the most important: to clear the gun of any ammunition by removing the magazine and inspecting the chamber, while the bolt carrier assembly is held back to make sure it is empty. To clean any gun properly and thoroughly, strip it down to its major groups—for example, on an AR-15, the upper, lower, and bolt carrier components—and remove the bolt. All other parts, like the buffer tube and spring, should be removed as well. Your owner's manual is a great guide to fieldstripping the weapon.
Use a cloth and wipe off all the excess carbon deposits on each of the major pieces before using any cleaning products; use a paintbrush and dust off the exterior parts, paying close attention to the small nooks. Use a small bowl of gun solvent to soak the small parts and break down any excess buildup. Use a cotton swab dipped in solvent to reach inside the gas key on the bolt carrier. The buffer spring and tube can be wiped down with a rag and set aside, but use solvent sparingly. Run a solvent-dipped brush smaller than the diameter of the barrel and attached to a T-handle down the barrel's bore. Always clean from the breech to the muzzle to push out any debris. Do the same thing, but with a slotted tip and a clean patch. Repeat until the patches come out clean. After the smaller bolt parts have soaked in the solvent, use a wire brush to clean off any remaining deposits. Make sure to completely wipe down all these pieces with a rag. Dry the chamber, receiver and flash compensator.
Apply a small amount of lubricating oil to the engagement surfaces of the hammer and trigger. Place a small drop on each side of the hammer/ trigger pin and safety. Apply a generous coat of lubricating oil to the bolt and its smaller parts and the outer surfaces of the bolt carrier (like the bolt cam pin). Put a drop or two inside the carrier key and a light coat on the charging handle. If there are any pieces particularly shiny from friction, that is where you need to add a drop of oil. Wipe down the exterior of the gun to remove excess oil. To store the weapon, apply a thin coat of lubricating oil on the bore, chamber and bolt face. Otherwise, make sure these pieces are clean and no oil has leaked into the chamber or cartridge head.