The primordial B-modes component of the cosmic microwave background (CMB) polarization is a promising experimental data set to probe the inflationary paradigm. B modes are indeed a direct consequence of the presence of gravitational waves in the early Universe. However, several secondary effects in the low-redshift universe will produce nonprimordial B modes. In particular, the gravitational interactions of CMB photons with large-scale structures will distort the primordial E modes, adding a lensing B-mode component to the primordial signal. Removing the lensing component ("delensing") will then be necessary to constrain the amplitude of the primordial gravitational waves. Here, we examine the role of current and future large-scale structure surveys in a multitracers approach to CMB delensing. We find that, in general, galaxy surveys should be split into tomographic bins, as this can increase the reduction of lensing B modes by similar to 25% in power in the most futuristic case. Ongoing or recently completed CMB experiments will particularly benefit from large-scale structure tracers that, once properly combined, will have a better performance than a CMB internal reconstruction. With the decrease of instrumental noise, the lensing B-modes power removed using CMB internal reconstruction alone will rapidly increase. Nevertheless, optical galaxy surveys will still play an important role even for fourth-generation CMB experiments. In particular, an LSST-like survey can a achieve a delensing performance comparable to a third-generation CMB experiment but with entirely different systematics. This redundancy will be essential to demonstrate the robustness against systematics of an eventual detection of primordial B modes.