Producing mucus is your lung's natural reaction to a bacteria, virus or an irritant. Its function is to help clear out whatever it is in your lungs or airways that shouldn't be there. Coughing is also something that has to occur to help clear it out.
Having a chronic lung disease causes excess mucus production in the lungs and makes you more susceptible to complications from the common cold. Being unable to clear out mucus can turn a chest cold into pneumonia for someone is elderly or for someone who has a chronic lung condition.
Other things that cause excess mucus production are things that irritate the lungs and air passages, such as cigarette or other tobacco smokes, cold dry air, allergies, acute bronchitis and drainage from sinus infections.
Taking medicine to suppress a cough might not be the best answer. You need to cough to expel the mucus, and what you need to be doing is helping to thin it out so it's easier to get rid of.
To help thin your mucus, drink plenty of water or other clear liquids. Non-caffeinated warm drinks, like decaf teas, decaf coffee or herbal teas will also help by warming up and relaxing your chest muscles. Opt for soy milk instead of cows milk. Cows milk contributes to the production of excess phlegm, while soy milk actually cuts down on mucus and helps improve lung function. Stay away from caffeinated drinks and alcoholic drinks, which will actually slightly dehydrate you and make it harder to cough up mucus.
If you can handle spicy foods like medium to hot salsa, chili peppers, onions, garlic and horseradish, these foods have been found to help cut through mucus in your sinuses, which will help to prevent the drainage into your lungs. You should also eat more foods that contain vitamin C, ginger, and of course, chicken soup.
Put a humidifier in the room with you wherever you are. The warm, clean, moist air will help keep your lungs warm and moist and better able to clear out the mucus.
Eucalyptus oil is well known for helping with respiratory ailments and clearing out mucus. Put a few drops of eucalyptus essential oil in your humidifier (just a few – essential oils are highly concentrated). Chest rubs also contain eucalyptus, so get some and rub it on your chest, or simply breathe it in.
Do some chest percussion on yourself, and have someone else do back percussion. Have your doctor guide you in how to do these, and show the best places on your chest and back to do them. The gentle, repetitive impact on your chest and back works to knock lose the mucus in your lungs, so you can cough them up. You might find that once you do them for a minute or two, you will automatically start coughing.
One thing you shouldn't do is swallow what you've coughed up. Spit it out as much as you can, since it is something your body is trying to get rid of.