The act of gradually removing persons with reversible forms of respiratory failure who are receiving mechanical ventilation from that support. This may be done by alternating full ventilatory support with increasingly long periods of unassisted breathing. The timing and frequency of the weaning periods should be individualized to each patient. Usually by the time the patient can tolerate 2 hr of spontaneous breathing, ventilatory support may be discontinued.