Our aim is to investigate whether the presence of baryons can have any significant influence on the properties of the local Hubble flow which has proved to be ‘cold’. We use two cosmological zoom simulations in the standard Lambda cold dark matter (ΛCDM) cosmology with the same set of initial conditions to study the formation of a Local Group like system within a sphere of ∼7 h−1 Mpc. The first one is a pure dark matter simulation (runDM) while a complete treatment of the physics of baryons is introduced in the second one (runbaryons). A simple algorithm based on particle identity allows us to match haloes from the two runs. We found that galaxies identified in runbaryons and their corresponding dark matter haloes in runDM have very similar spatial distributions and dynamical properties on large scales. Then, when analysing the velocity field and the deviation from a pure Hubble flow in both simulations, namely when computing the dispersion of peculiar velocities of galaxies σ*(R) and those of their corresponding dark matter haloes σDM(R) in runDM, we found no particular differences for distances R= 1–8 Mpc from the Local Group mass centre. This suggests that the presence of baryons has no noticeable impact on the global dynamical properties of the local Hubble flow within such distances. Then, the results indicate that the ‘true’σ*(R) values can be estimated from the pure dark matter simulation with a mean error of 3 km s−1 when dark matter haloes are selected with maximum circular velocities of Vc≥ 30 km s−1, corresponding to a population of dark matter haloes in runbaryons that host galaxies. By investigating the properties of the Hubble flow at distances R∼ 0.7–3 Mpc, we also found that the estimation of the total mass enclosed at the radius of the zero‐velocity surface R0, using the spherical infall model adapted to ΛCDM, can be underestimated by at least 50 per cent.