Data from ground-based gravitational-wave detectors contains numerous
short-duration instrumental artifacts, called "glitches." The high rate of
these artifacts in turn results in a significant fraction of gravitational-wave
signals from compact binary coalescences overlapping glitches. In LIGO-Virgo's
third observing run, $\approx 20\mathrm{\%}$ of signals required some form of mitigation
due to glitches. This was the first observing run that glitch subtraction was
included as a part of LIGO-Virgo-KAGRA data analysis methods for a large
fraction of detected gravitational-wave events. This work describes the methods
to identify glitches, the decision process for deciding if mitigation was
necessary, and the two algorithms, BayesWave and gwsubtract, that were used to
model and subtract glitches. Through case studies of two events,
GW190424_180648 and GW200129_065458, we evaluate the effectiveness of the
glitch subtraction, compare the statistical uncertainties in the relevant
glitch models, and identify potential limitations in these glitch subtraction
methods. We finally outline the lessons learned from this first-of-its-kind
effort for future observing runs.