What is a lung infection?

A lung infection, or pulmonary infection, happens when harmful microbes, like viruses, bacteria, or fungi, enter the lungs and cause inflammation. These infections range from mild colds to severe pneumonia, which may require medical treatment.

Mild lung infections, like those from colds or respiratory viruses, are typically managed by primary care doctors. More complex or antibiotic-resistant infections, like mycobacterial infections, require specialized care from pulmonologists (lung specialists). Penn Medicine’s Mycobacterial Infections Clinic is one of the few healthcare facilities in the southeastern Pennsylvania and New Jersey regions dedicated to evaluating and treating these challenging infections.

Types of lung infections

There are many types of infections that occur in the lungs. They can be caused by contagious bacteria, a virus, or fungi in the air we breathe.

Lung infection symptoms

Lung infections can cause a range of symptoms, from mild to severe:

  • A cough lasting longer than three weeks
  • Shortness of breath (dyspnea) that doesn’t improve
  • Chest pain when breathing deeply or coughing
  • Mucus (phlegm) that is greenish, yellow, or bloody
  • Fever, chills, and sweating
  • Fatigue and weakness
  • Loss of appetite and weight loss
  • Wheezing noises when breathing

What causes a lung infection?

Lung infections can develop when you breathe in viruses or bacteria, often from close contact with someone who is sick and coughing, sneezing, or talking, or by touching a contaminated surface. Fungal lung infections can occur by inhaling microscopic spores found in soil, decaying leaves, and plants.

Chronic lung diseases like asthma, COPD, and cystic fibrosis increase the risk of infection. Other infections result from long-term exposure to lung irritants like air pollution, dust, fumes, and chemicals. Smoking and secondhand smoke raise the risk by weakening the lungs’ defenses (immune system), making it harder to fight off infection.

Diagnosing lung infections

To diagnose a lung infection, your provider will listen to your lungs for abnormal sounds like crackling or wheezing. They may check your blood oxygen levels and order tests like a complete blood count (CBC), sputum culture, arterial blood gas test, or TB skin test. If pneumonia is suspected, imaging tests are often recommended.

Respiratory infection treatment

Treatment for lung infection depends on the cause and your symptoms. Your doctor may prescribe antibiotics, antifungal or antiviral medications, or bronchodilators. Over-the-counter drugs, like expectorants and mucus thinners, can relieve discomfort. Pulmonary rehabilitation, a supervised exercise program, can help improve lung function. Severe or chronic cases, like COPD, may require surgery.

Treatments include:

  • Corticosteroids
  • Oxygen therapy
  • Lung infection surgery
  • Lung decortication
  • Lung resection

Preventing lung infections

There are some things you can do to protect your immune system and reduce your risk of lung infections:

  • Get vaccinated: Flu, pneumonia, RSV, Tdap, and COVID-19 vaccines help prevent serious respiratory infections.
  • Practice good hygiene: Wash your hands often and avoid close contact with sick people.
  • Don’t smoke: Smoking damages lung tissue and weakens your ability to fight infections.
  • Stay active and eat well: Regular exercise and a healthy diet boost your immune system.
  • Manage chronic conditions: Keep asthma, COPD, and other lung diseases under control.
  • Avoid pollutants: Limit exposure to air pollution, dust, and harmful chemicals.

Specialized care for lung infections

Penn Medicine’s lung specialists diagnose and treat complex conditions of the airway, lungs, and pleura (lung lining). We offer expert care through specialized programs for different types of lung infections.

Our Mycobacterial Infections Clinic is one of the few centers focused on hard-to-treat infections. At the Harron Lung Center, our team of experts uses advanced treatments and technologies to provide individualized care that’s right for you.

Related specialties

Schedule an appointment

We can help you schedule an appointment or you can search our directory of specialists.