We consider the vectorial approach to the binary Darboux transformations for the Kadomtsev-Petviashvili hierarchy in its Zakharov-Shabat formulation. We obtain explicit formulae for the Darboux transformed potentials in terms of Grammian type determinants. We also study the $n$-th Gel'fand-Dickey hierarchy introducing spectral operators and obtaining similar results. We reduce the above mentioned results to the Kadomtsev-Petviashvili I and II real forms, obtaining corresponding vectorial Darboux transformations. In particular for the Kadomtsev-Petviashvili I hierarchy we get the line soliton, the lump solution and the Johnson-Thompson lump, and the corresponding determinant formulae for the non-linear superposition of several of them. For Kadomtsev-Petviashvili II apart from the line solitons we get singular rational solutions with its singularity set describing the motion of strings in the plane. We also consider the I and II real forms for the Gel'fand-Dickey hierarchies obtaining the vectorial Darboux transformation in both cases.