Skip to main contentSkip to accessibility services

Coughing Up Green or Yellow Phlegm

Mucus is your body’s way of dealing with an infection, and it’s not always bad.

What is phlegm?

When you get a cough, you may start to see thicker, darker mucus come up. Mucus is a normal fluid produced by many parts of the body.

It keeps certain tissue in your body from drying out. It’s also your body’s front line of defense because it traps germs and other foreign particles.

Phlegm is a type of mucus that your lungs produce and comes up when you cough. When you cough up a lot of phlegm and it’s yellow or green, it usually means you have an infection or other lung condition.

How mucus does its job

The airways of the lung constantly make mucus. The cells that line the airways have small hairs called cilia.

The cilia rhythmically beat back and forth, sweeping mucus up out of the airways and into the mouth. The mucus takes with it any foreign particles, like dirt, dust, or bacteria. This keeps the airways clean and free from infection.

Pro Tip

It is a common misconception that cough with new green or yellow phlegm means you have a bacterial infection needing antibiotics. The phlegm may be from a variety of infections (viruses or bacteria) and rarely are antibiotics required in those without an underlying lung condition. For common chest colds, antibiotics do not decrease the duration of symptoms and can have dangerous side effects. —Dr. Benjamin Ranard

What can you tell by the color and consistency of phlegm?

Dr. Rx

I want to know how long has this been going on? Is it getting better or worse? And whether anything seems to improve or worsen the condition. —Dr. Ranard

When the lungs become infected, either from bronchitis (inflammation of bronchial tubes) or pneumonia (inflammation of air sacs), they often create more mucus.

Infection may cause mucus to change from a clear or light yellow thinner liquid to a darker thicker one. Mucus can become darker yellow or green. The dead white blood cells and other changes from the body’s response to infection cause this color change. The change in color may mean that your body is fighting off an infection. But not always.

There is some evidence that green or yellow phlegm is more often caused by a bacterial infection (as opposed to a virus). It’s just not a guarantee, so your doctor will look at other symptoms to decide which type of infection you have—a bacterial one or a viral one.

Other symptoms you may have

If you have mild symptoms such as a cough, congestion, and sore throat for a few days, it’s likely you have a common cold from a virus. Colds can make you cough up phlegm as the body fights the infection. But once the infection is gone, the phlegm should also go away.

Longer lasting symptoms, or more severe symptoms such as fever or shortness of breath may indicate a bacterial infection (such as pneumonia) that requires an antibiotic. You will only be given antibiotics for bacterial infections, since antibiotics don’t help fight off viruses.

Sometimes, you can have brown or red phlegm. This is usually caused by some bleeding, which can happen from an infection, but can also be from other conditions.

A small amount of red-tinged phlegm that goes away within a few days and occurs while you’re sick with an infection is generally nothing to worry about. However, you should let your doctor know this happened next time you see them.

Call your doctor if you’re coughing up any significant blood or go to the emergency room if your doctor is not available.

What is causing your coughing up green or yellow phlegm?

Start a chat with Buoy AI assistant to find out what’s causing your coughing up green or yellow phlegm.

Free, private and secure to get you the best way to well. Learn about our technology.

Other causes of phlegm

Pro Tip

If you’ve been living with chronic cough and mucus, talk to your doctor about what may be causing the mucus. There may be easy treatments for the underlying cause—and it is important to try and figure out if there is an underlying condition causing the mucus. —Dr. Ranard

Exposure to toxins or chemicals (like cigarette smoke) can make you produce more mucus. The lining of the airways become irritated and produce mucus to help clear away the pollutants. Over time smoking can lead to increased mucus production even after quitting smoking.

People with a lung condition, such as chronic obstructive pulmonary disease (COPD), may also have darker yellow or green phlegm. This disease is more common with age. And it is especially common in people who smoke cigarettes.

However, there are other chronic diseases that can lead to more mucus production and more coughing up of phlegm such as cystic fibrosis or bronchiectasis.

Not all mucus comes from the lungs. The nasal passages can create mucus. This can happen from a common cold. It can also be from allergies such as hay fever.

When the mucus drips down the back of the throat (postnasal drip), it can cause coughing that is sometimes mistaken as phlegm coming from the lungs.

So... which condition is actually causing your coughing up green or yellow phlegm?

Free, secure, and powered by Buoy advanced AI to get you the best way to better. Learn about our technology.

How to treat phlegm

Phlegm that occurs with mild symptoms can be treated at home. You can try taking an over-the-counter cough suppressant (such as dextromethorphan) and/or an exportant to help thin the mucous (such as guaifenesin). Be sure to follow the directions on the package.

If you have more severe or long-lasting symptoms, you should see a doctor. They can help figure out what is causing the phlegm and the best way to treat it.

Share your story
Was this article helpful?
Read this next