$\newcommand{\ab}{\mathrm{ab}}$Suppose we have a topological space $X$ with a non-abelian fundamental group $\pi_1(X)$. We'd like to perform a sequence of topological operations on $X$ (for example, filling in holes) to arrive at a space $X^{\ab}$ whose fundamental group is the abelianization of $X$: $\pi_1(X^{\ab}) = \pi_1(X)^{\ab}$.
What is this procedure called? What are the operations involved? Can this always be done in a systematic manner?
I'd like to know how many homotopically distinct $X^{\ab}$ we'd get in this way, expressed in terms of some measure of complexity of $\pi_1(X)$.
Ultimately, I'd like a description of the topological simplification along all the steps of the derived series of $\pi_1(X)$.