Living active matter systems such as bacterial colonies, schools of fish and human crowds, display a wealth of emerging collective and dynamic behaviours as a result of far-from- equilibrium interactions. The dynamics of these systems are better understood and controlled considering their interaction with the environment, which for realistic systems is often highly heterogeneous and disordered. Here, we demonstrate that the presence of spatial disorder can alter the long-term dynamics in a colloidal active matter system, making it switch between gathering and dispersal of individuals. At equilibrium, colloidal particles always gather at the bottom of any attractive potential; however, under non-equilibrium driving forces in a bacterial bath, the colloids disperse if disorder is added to the potential. The depth of the local roughness in the environment regulates the transition between gathering and dispersal of individuals in the active matter system, thus inspiring novel routes for controlling emerging behaviours far from equilibrium.