Most of the composting techniques discussed on this site are aerobic—they depend on the availability of air. However, due to bacteria and other microorganisms that are able to function without air, decomposition can occur in an anaerobic environment. A noxious smell is the telltale sign of anaerobic composting. Many homeowners have inadvertently experimented with anaerobic composting when they seal plastic bags full of grass clippings and let the bags sit for a while.
The anaerobic approach to composting can be practical for small amounts of material if you take care to keep bad odors from escaping. Some commercial composting bins designed to handle food scraps, such as kitchen waste digesters, work anaerobically.
Another common device for anaerobic decomposition is a large plastic bag into which you put organic materials, such as leaves, grass clippings, and even kitchen waste. Add a few handfuls of soil to spur microbial activity, or use a compost activator intended for plastic-bag composting. If the materials in the bag are dry, then add water to make them moist but not wet. Secure the bag and place it in the sun to heat up. Turn the bag every week or two, not because it needs air, but to mix the materials and expose all sides to the heat of the sun.
There’s no way to predict how long this process will take to produce compost, but you can start to check for a finished product after a few months. If the material is very wet and smells bad, add dry material and tie the bag up again for another month or two. Continue to turn the bag regularly. Compost produced this way is similar to compost produced aerobically.