This letter focuses on the pilot contamination problem in the uplink and downlink of cell-free massive multiple-input multiple-output networks with different degrees of cooperation between access points. The optimum minimum mean square error processing can take advantage of large-scale fading coefficients for canceling the interference of pilot-sharing user-equipments and thus achieves asymptotically unbounded capacity. However, it is computationally demanding and can only be implemented in a fully centralized network. Here, sub-optimal schemes are derived that provide unbounded capacity with linear-growing complexity and using only local channel estimates but global channel statistics. This makes them suited for both centralized and distributed networks. In this latter case, the best performance is achieved with a generalized maximum ratio combiner that maximizes a capacity bound based on channel statistics only.