How can I prevent Pneumocystis carinii pneumonia? by Specialist There is no vaccine available to prevent Pneumocystis pneumonia, but it can be prevented in patients with HIV or other immunosuppressed patients by using medications such as compound sulphamethoxazole.