Cavitary pneumonia is a lung infection severe enough to kill a patch of lung tissue and leave a hollow space where healthy lung used to be. On a scan the space looks like a dark hole, which is why reports describe it as a cavity. A cavity is a sign of damage, not a disease of its own, so the real question is always what made it. The answer matters for treatment, because bacteria, tuberculosis and fungi each need different medicines.
How an Infection Hollows Out Part of the Lung
Lung cavities almost never appear in otherwise healthy lung. They form when an existing lesion produces dead tissue that is then expelled.1PubMed Central. Pathologic Review of Cystic and Cavitary Lung Diseases So when a cavity shows up, it tells your doctor that something has been actively destroying lung.
In pneumonia, the hole usually opens inside a consolidation, a patch where the air sacs have filled with fluid and pus.2EMCrit Project. Severe community-acquired pneumonia The stages run in a clear order. First the air sacs fill, and that part of the lung turns solid on a scan. Then the center loses its blood supply and dies. The dead material softens and drains into an airway, and coughing brings it up, sometimes as bloody or foul-smelling sputum. Air moves into the emptied space, which then shows dark on an X-ray.
Some cavities hold fluid instead of air, and a fluid-filled cavity with a thick wall is called a lung abscess.2EMCrit Project. Severe community-acquired pneumonia When the infection kills tissue in more than one spot, doctors call it necrotizing pneumonia.2EMCrit Project. Severe community-acquired pneumonia People often confuse “cavity” with “cyst.” A cyst is usually a thin-walled space that forms without active tissue destruction.
The dark look comes from density. Air is far less dense than fluid or tissue, so an air-filled space looks dark against the whiter, solid-looking lung around it. A cavity that is only partly drained may hold both air and fluid, and on an upright film that can appear as a flat fluid line with air above it. A CT shows cavities, their walls and their surroundings in much more detail than a plain X-ray, which is why a cavity first noticed on an X-ray is often followed by a CT.
The body’s own defenses add to the damage. In tuberculosis, the immune system’s reaction drives cavity formation, not just the germ itself.3PubMed Central. Tuberculosis, Pulmonary Cavitation, and Matrix Metalloproteinases Immune cells release enzymes that break down the lung’s supporting framework, and the body’s natural brakes on those enzymes fall behind.3PubMed Central. Tuberculosis, Pulmonary Cavitation, and Matrix Metalloproteinases TB cavities can form quickly out of dense solid patches of infected lung.4PubMed Central. Mycobacterium tuberculosis dysregulates MMP/TIMP balance to drive rapid cavitation and unrestrained bacterial proliferation4PubMed Central. Mycobacterium tuberculosis dysregulates MMP/TIMP balance to drive rapid cavitation and unrestrained bacterial proliferation
The Germs That Most Often Cause Cavities
Some community strains of MRSA, a drug-resistant Staph, carry a toxin called PVL that makes them especially tissue-destroying.5PubMed. Necrotizing pneumonia caused by community-acquired methicillin-resistant Staphylococcus aureus: an increasing cause of “mayhem in the lung” In previously healthy young adults these strains can cause a fast, bleeding, tissue-destroying pneumonia that kills up to 3 in 4 patients in reported cases.6Journal of the Intensive Care Society. Necrotising Pneumonia, Staphylococcus Aureus and Panton-Valentine Leukocidin This form is uncommon.6Journal of the Intensive Care Society. Necrotising Pneumonia, Staphylococcus Aureus and Panton-Valentine Leukocidin Holes can appear and multiply within days, as in one reported case in a 66-year-old man whose pneumonia did not respond to the first antibiotics.7Internal Medicine. Rapidly Progressive Multiple Cavity Formation in Necrotizing Pneumonia Caused by Community-acquired Methicillin-resistant Staphylococcus aureus Positive for the Panton-Valentine Leucocidin Gene
Klebsiella bacteria can cause coughed-up blood and cavities that look like tuberculosis.8PubMed. Klebsiella pneumoniae pneumonia Its thick outer coating makes it hard to treat.8PubMed. Klebsiella pneumoniae pneumonia Even strep throat bacteria have caused a bleeding cavitary pneumonia in one previously healthy 33-year-old.9PubMed Central. Hemorrhagic pneumonia and upper lobe pulmonary cavitary lesion caused by Streptococcus pyogenes
Tuberculosis is the classic cause of slowly developing cavities, often in the upper lungs. Doctors often test for TB when a cavity has been forming over weeks or months. Because a TB cavity can hold very large numbers of bacteria that coughing sends into the air, a person with a cavity is often treated as more contagious until tests show otherwise.4PubMed Central. Mycobacterium tuberculosis dysregulates MMP/TIMP balance to drive rapid cavitation and unrestrained bacterial proliferation Hospitals commonly place such patients in an isolation room while sputum tests are done. That is a precaution while TB is ruled in or out, not a sign that the cavity is TB.
Fungi are a major cause in some regions. In southern Arizona, fungi caused about 7 in 10 cavitary pneumonias.10PubMed Central. Cavitary Pneumonia Causes in the Arid Landscapes of Southern Arizona Valley fever, a fungus found in desert soil, was the single most common cause there and made up 39% of all cases.10PubMed Central. Cavitary Pneumonia Causes in the Arid Landscapes of Southern Arizona Some people had a fungal and a bacterial infection at the same time, about 7%.10PubMed Central. Cavitary Pneumonia Causes in the Arid Landscapes of Southern Arizona If you live in or have visited the desert Southwest, mention it to your doctor.
Standard pneumonia antibiotics may not cover MRSA, and fungi and TB don’t respond to ordinary antibiotics at all. A cavity that keeps growing despite treatment often leads doctors to test for different germs.
Finding the germ takes several tools. Sputum samples are grown in the lab to identify the organism, and blood tests and cultures look for bacteria or fungal infection. Some patients need a bronchoscopy, a camera passed into the airway, to collect a sample.
The scan alone cannot name the organism, because cavities from different germs can look alike; Klebsiella and TB, for example, can resemble each other. Doctors combine the scan with how fast the illness came on, the person’s risk factors, where they live or have traveled, and lab results. That is why several tests are often ordered at once rather than waiting to see whether the first antibiotic works.
Who Is Most Likely to Develop It
Many lung abscesses start with aspiration, which means inhaling material from the mouth or throat into the lungs.11PubMed. Aspiration pneumonia and primary lung abscess: diagnosis and therapy of an aerobic or an anaerobic infection? Bacteria that don’t need oxygen normally live in the mouth and upper airway.12PubMed. Treatment of aspiration pneumonia and primary lung abscess. Penicillin G vs clindamycin Once inhaled, they are frequent causes of abscesses, tissue-destroying pneumonia and pus around the lung after aspiration.11PubMed. Aspiration pneumonia and primary lung abscess: diagnosis and therapy of an aerobic or an anaerobic infection?13PubMed. Anaerobic bacterial infection of the lung
Aspiration often happens without anyone noticing. Heavy drinking or sedatives dull the gag and cough reflex, and seizures, strokes or anesthesia can let saliva slip into the airway. Swallowing problems in older adults raise the risk too.
Poor oral hygiene, dental disease, alcoholism, drug use and reduced consciousness all raise the risk of a lung abscess.14PubMed Central. Effective pharmacotherapy for lung abscess in a patient with alcoholism People with alcoholism more often get Klebsiella abscesses and do worse.14PubMed Central. Effective pharmacotherapy for lung abscess in a patient with alcoholism Treating dental infections and keeping teeth and gums clean helps, as does cutting back on alcohol, especially binge drinking. If you often choke on food or drink, ask about a swallowing evaluation.
A weakened immune system changes the picture. About 15% of people with valley fever cavities had weakened immune systems or transplants.15PubMed Central. Coccidioidal Pulmonary Cavitation: A New Age Organ transplant, chemotherapy, long-term steroid use, advanced HIV or poorly controlled diabetes make it harder to wall off an infection, so germs spread and destroy tissue more easily. In these people, fungi and unusual organisms that rarely trouble healthy lungs become more likely causes.
Symptoms and How Fast It Comes On
In valley fever cavities, cough was the most common symptom, in 55% of people.15PubMed Central. Coccidioidal Pulmonary Cavitation: A New Age About 38% coughed up blood, 29% had fever and 28% were short of breath.15PubMed Central. Coccidioidal Pulmonary Cavitation: A New Age Some had chest pain, weight loss or poor appetite.15PubMed Central. Coccidioidal Pulmonary Cavitation: A New Age Bacterial forms tend to make people very sick within a few days, often with sepsis, a dangerous body-wide reaction to infection.2EMCrit Project. Severe community-acquired pneumonia
Cough, fever, chest pain and breathlessness appear in many lung infections, so they signal that something is wrong but do not separate bacteria from TB or fungi. Weight loss and night sweats suggest a slower illness such as TB, a fungal infection or cancer, though they can also follow a long bacterial illness.
Timing is a better clue, though not proof. Illness that develops in under 12 weeks points mostly to common bacteria.16PubMed. Cavitary Lung Diseases: A Clinical-Radiologic Algorithmic Approach Illness lasting 12 weeks or more points more toward TB, fungi, cancer, or autoimmune disease.16PubMed. Cavitary Lung Diseases: A Clinical-Radiologic Algorithmic Approach
Bad-smelling or bad-tasting phlegm can be a clue to mouth bacteria from aspiration. It can arrive in a sudden large amount when an abscess drains into an airway. Report it to your doctor right away.
Some signs need emergency care: coughing up more than a little blood, breathing that gets harder over hours, confusion, a very fast heartbeat or low blood pressure (signs of sepsis), or a high fever that persists despite antibiotics.
Could a Lung Cavity Be Something Other Than Infection
Some lung cancers outgrow their blood supply, die at the center and form a cavity in the same way infection does. Cancer is considered particularly when the cavity has a thick or irregular wall, appears in a smoker or older adult, or fails to respond to treatment. Considering it is a routine part of the work-up and does not mean it is likely.
Wall thickness is one clue. Cavities with walls of 4 mm or less are usually not cancer.1PubMed Central. Pathologic Review of Cystic and Cavitary Lung Diseases Walls of 5 to 15 mm are equally likely to be either.1PubMed Central. Pathologic Review of Cystic and Cavitary Lung Diseases Above 15 mm, most turn out to be cancer.1PubMed Central. Pathologic Review of Cystic and Cavitary Lung Diseases Thin-walled cancers do occur, so thickness is never the final word.17PubMed Central. Differential Diagnosis of Cavitary Lung Lesions Inflamed lung around a cavity is more typical of infection.17PubMed Central. Differential Diagnosis of Cavitary Lung Lesions
Follow-up imaging fills in the rest. Infection cavities usually shrink as treatment works, while one that doesn’t change or grows calls for more tests. A biopsy may be needed when the scan pattern looks like cancer.
How Cavitary Pneumonia Is Treated
The wall of an abscess and the thick fluid inside keep antibiotics from reaching the infection well,18PubMed Central. Effects of Prolonged Antibiotic Therapy in Lung Abscesses—Analysis of Case Series so treatment has to last longer than for ordinary pneumonia.18PubMed Central. Effects of Prolonged Antibiotic Therapy in Lung Abscesses—Analysis of Case Series Treatment can also fail when the germ is resistant, drainage is blocked, or the drug can’t get through the wall.19PubMed Central. Antibiotic instillation for a chronic lung abscess
Once the germ is known, doctors narrow broad antibiotics to the one that targets it, which reduces side effects and the chance of resistance. TB needs a combination of several drugs taken for months, and fungal infections need antifungal medicines instead of antibiotics. Doctors may adjust the plan if scans or lab results show the first choice is not working.
A long course often starts by IV in the hospital and may switch to pills at home once fever settles. Finish every dose even after you feel better. Repeat scans check whether the cavity is shrinking.
Most lung abscesses are cured with antibiotics alone, but about 10 to 20% need a procedure.20Journal of Brown Hospital Medicine. Large Lung Abscesses Managed with Percutaneous Drainage Reasons include serious bleeding, ongoing sepsis, cavities larger than 6 cm, or infection still active after six weeks of antibiotics.20Journal of Brown Hospital Medicine. Large Lung Abscesses Managed with Percutaneous Drainage An air leak between the airway and the chest lining is another reason.21PubMed Central. Evaluating the effectiveness of thoracoscopic intervention for pulmonary abscess: is lobectomy the optimal solution after medical therapy fails? A tube placed through the skin under scan guidance can drain the abscess in people too ill for surgery.20Journal of Brown Hospital Medicine. Large Lung Abscesses Managed with Percutaneous Drainage Surgery may remove a small wedge, a whole lobe, or rarely an entire lung.22PubMed Central. Lung abscess: the non-conservative management: a narrative review
Many abscesses empty on their own through the airway, which is why coughing up the material is part of healing. Physical therapy that helps a person change position and cough can aid it. A drain through the skin or a bronchoscopy is considered only if the abscess does not empty on its own.
Complications can lengthen the hospital stay. Pus can collect between the lung and chest wall and need a chest tube, and an air leak may need valves placed by bronchoscopy.
Recovery and Whether the Lung Heals
In children with tissue-destroying pneumonia, nearly all lung damage cleared on scans within 4 to 6 months.23PubMed. Necrotizing Pneumonia In Children: A Review Most of those children later had no symptoms and normal lung tests.23PubMed. Necrotizing Pneumonia In Children: A Review Some had mildly reduced lung function years later, so follow-up checks are sensible.24PubMed. Long-term outcomes of necrotizing pneumonia
Adults can take longer, especially those with other lung disease or a smoking history. Thin-walled valley fever cavities close within 2 years about half the time, and a few last more than 10 years.25PubMed Central. Pulmonary coccidioidomycosis presenting as a fungal ball mimicking aspergilloma A lingering cavity can be colonized by a fungus that forms a ball inside it.25PubMed Central. Pulmonary coccidioidomycosis presenting as a fungal ball mimicking aspergilloma Doctors judge progress by repeated scans over time instead of expecting a set date.
Day to day, tiredness and cough can linger for weeks after the fever goes. Breathlessness on stairs usually improves gradually, and return to work depends on how severe the illness was.
Questions worth raising at follow-up: a repeat scan to confirm the cavity has closed, and lung function testing if breathlessness persists. Report any new coughing of blood, which can signal a fungal ball or reinfection. Ask about flu and pneumonia vaccines to lower future risk.

