Bloodstream infections and graft-versus-host disease are common complications after hematopoietic stem cell transplantation (HSCT) procedures, associated with the gut microbiota that acts as a reservoir for opportunistic pathogens. Selective gut decontamination (SGD) and total gut decontamination (TGD) during HSCT have been associated with a decreased risk of developing these complications after transplantation. However, because studies have shown conflicting results, the use of these treatments remains subject of debate. In addition, their impact on the gut microbiota is not well studied. The aim of this study was to elucidate the dynamics of the microbiota during and after TGD and to compare these with the dynamics of SGD. In this prospective, observational, single-center study fecal samples were longitudinally collected from 19 children eligible for allogenic HSCT (TGD, n=12; SGD, n=7), weekly during hospital admission and monthly after discharge. In addition, fecal samples were collected from 3 family stem cell donors. Fecal microbiota structure of patients and donors was determined by 16S rRNA gene amplicon sequencing. Microbiota richness and diversity markedly decreased during SGD and TGD and gradually increased after cessation of decontamination treatment. During SGD, gut microbiota composition was relatively stable and dominated by Bacteroides, whereas it showed high inter- and intraindividual variation and low Bacteroides abundance during TGD. In some children TGD allowed the genera Enterococcus and Streptococcus to thrive during treatment. A gut microbiota dominated by Bacteroides was associated with increased predicted activity of several metabolic processes. Comparing the microbiota of recipients and their donors indicated that receiving an SCT did not alter the patient's microbiota to become more similar to that of its donor. Overall, our findings indicate that SGD and TGD affect gut microbiota structure in a treatment-specific manner. Whether these treatments affect clinical outcomes via interference with the gut microbiota needs to be further elucidated.