How to Prevent Pneumonia at Home and After Surgery

Preventing pneumonia comes down to a handful of strategies: staying current on vaccines, not smoking, keeping chronic conditions well managed, and maintaining good oral hygiene. Some of these are obvious, others are surprising. Each one meaningfully lowers your risk, and combining them offers the strongest protection.

Get Vaccinated Against Both Pneumonia and the Flu

Vaccination is the single most effective way to prevent pneumonia. Two types of vaccines matter here: pneumococcal vaccines, which target the bacteria most commonly responsible for pneumonia, and the annual flu shot, which prevents influenza from opening the door to a secondary lung infection.

For children, the CDC recommends a four-dose pneumococcal vaccine series (PCV15 or PCV20) given at 2 months, 4 months, 6 months, and between 12 and 15 months. Adults 65 and older, or younger adults with certain risk factors like heart disease, lung disease, or a weakened immune system, also need pneumococcal vaccination. If you haven’t been vaccinated and fall into one of these groups, ask your doctor which version is right for you.

The flu vaccine deserves attention for a reason people often overlook. When influenza damages the lining of your airways, bacteria can move in and cause a secondary pneumonia. Among people hospitalized with influenza who develop pneumonia, up to 75% are confirmed to have a bacterial co-infection. Even in broader studies, 11 to 35% of lab-confirmed flu cases involve a secondary bacterial infection. A yearly flu shot doesn’t just prevent the flu; it prevents one of the most common paths to pneumonia.

Quit Smoking

Smoking paralyzes the tiny hair-like structures in your airways that sweep bacteria and debris out of your lungs. It also triggers chronic inflammation that weakens local immune defenses. The result is a significantly higher chance of developing pneumonia.

Quitting helps, but the timeline for recovery is long. Among people without chronic obstructive pulmonary disease (COPD), former smokers who quit more than 10 years ago had a 38% lower risk of being hospitalized for pneumonia compared to current smokers. Those who quit more recently didn’t yet show the same benefit. For people who already have COPD, quitting didn’t measurably reduce pneumonia hospitalizations in the available research, likely because the lung damage is already extensive. The takeaway: the sooner you quit, the better, because the protective effect takes years to fully develop.

Limit Alcohol Consumption

Heavy drinking suppresses your immune system and impairs the reflexes that protect your airways, particularly the cough reflex and the ability to clear secretions from your lungs. The risk of community-acquired pneumonia rises steadily with the amount of alcohol consumed. Compared to non-drinkers, people consuming roughly six standard drinks a day face a 76% higher risk of pneumonia. People with a clinically defined alcohol use disorder face an eightfold increase in risk.

Even moderate drinking nudges the risk upward. About two standard drinks a day corresponds to a 12% increase. If you’re already at higher risk for pneumonia due to age or other health conditions, cutting back on alcohol is one of the more impactful changes you can make.

Manage Diabetes and Blood Sugar

High blood sugar impairs the white blood cells responsible for hunting and killing bacteria in your lungs. Specifically, it disrupts their ability to move toward infection sites, engulf bacteria, and destroy them. This makes people with diabetes more susceptible to pneumonia regardless of other risk factors.

The degree of risk tracks closely with blood sugar control. A study published in Diabetes Care found that people with an A1c below 7% had a 22% higher risk of pneumonia hospitalization compared to people without diabetes. At an A1c of 9% or above, that risk jumped to 60% higher. Every point of A1c improvement matters. If you have diabetes, keeping your blood sugar as close to target as possible is one of the most effective things you can do to protect your lungs.

Take Oral Hygiene Seriously

This is the prevention strategy most people don’t expect. Your mouth is home to billions of bacteria, and when those bacteria are inhaled into the lungs, especially during sleep, they can cause aspiration pneumonia. This is particularly dangerous for older adults, people with swallowing difficulties, and anyone who wears dentures.

The data is striking. Inadequate oral care was identified as one of only two modifiable risk factors significantly associated with developing aspiration pneumonia, with a 60% increase in risk. People with 10 or more natural teeth and deep periodontal pockets had a 3.9 times greater risk of dying from pneumonia than those without gum disease. One study of nursing home residents found that those who received regular oral care developed pneumonia at roughly 60% the rate of those who didn’t. A systematic review estimated that 1 in 10 deaths from pneumonia in elderly nursing home residents could be prevented simply by improving oral hygiene.

Research from Tokyo also found that wearing dentures during sleep doubles the risk of pneumonia in very old adults. If you or a family member wears dentures, removing and cleaning them at night is a simple but meaningful precaution. Regular brushing, flossing, and professional dental cleanings all help keep the bacterial load in your mouth at a level your lungs can handle.

Reduce Indoor Air Pollution

Breathing in fine particulate matter damages your lung tissue and weakens your respiratory defenses over time. This is a massive problem globally: exposure to indoor air pollution accounts for roughly one million pneumonia deaths per year, mostly among children under five in low- and middle-income countries.

Homes that rely on solid fuels like wood, charcoal, or animal dung for cooking can have fine particulate levels 6 to 20 times higher than World Health Organization guidelines. Children in these environments face roughly double the risk of developing pneumonia. One study found that children in households using wood as cooking fuel were 44% more likely to fail initial pneumonia treatment, particularly if the child was also undernourished.

Even in higher-income settings, wood-burning stoves, poorly ventilated gas ranges, and secondhand smoke contribute to indoor air pollution. If you heat or cook with solid fuels, improving ventilation or switching to cleaner fuel sources makes a real difference for lung health, especially for young children and older adults in the household.

Check Your Vitamin D Levels

Vitamin D plays a role in activating immune cells in the lungs, and being deficient appears to increase your vulnerability. A meta-analysis of observational studies found that people with vitamin D levels below 20 ng/mL had a 64% higher risk of community-acquired pneumonia. That threshold, 20 ng/mL, is the same cutoff most labs use to define deficiency.

Whether supplements fix the problem is less clear. One trial giving adults 2,000 IU of vitamin D daily for 12 weeks raised blood levels significantly but didn’t reduce respiratory infections. A separate study in infants with pneumonia found that a single high dose of vitamin D3 essentially eliminated recurrence over three months. The mixed results suggest that correcting a deficiency is likely helpful, but megadosing when you’re already sufficient probably isn’t. If you’re at higher risk for pneumonia and haven’t had your vitamin D checked, it’s worth knowing where you stand.

Prevent Pneumonia After Surgery

Pneumonia is one of the most common complications after major surgery, particularly abdominal and chest operations. Anesthesia, pain that limits deep breathing, and prolonged time in bed all conspire to let fluid and bacteria settle in the lungs.

Hospitals often provide a handheld device called an incentive spirometer and ask you to use it regularly to encourage deep breathing. However, a Cochrane review found low-quality evidence that incentive spirometry actually prevents post-surgical pneumonia compared to no respiratory treatment, or compared to simple deep breathing exercises and physical therapy. The protocols studied varied wildly, from four times daily to ten times per hour.

What does help is getting out of bed and moving as soon as your surgical team allows it. Walking, even short distances in a hospital hallway, expands your lungs, clears secretions, and restores normal breathing patterns. If you’re given a spirometer, use it, but don’t treat it as a substitute for getting up and moving. The combination of early mobility, deep breathing, and elevating the head of your bed gives your lungs the best chance of staying clear during recovery.