Recently, much attention has been paid to the COVID-19 pandemic. Yet bacterial resistance to antibiotics remains a serious and unresolved public health problem that kills hundreds of thousands of people annually, being an insidious and silent pandemic. To contain the spreading of the SARS-CoV-2 virus, populations confined and tightened hygiene measures. We performed this study with computer simulations and by using mobility data of mobile phones from Google in the region of Lisbon, Portugal, comprising 3.7 million people during two different lockdown periods, scenarios of 40 and 60% mobility reduction. In the simulations, we assumed that the network of physical contact between people is that of a small world and computed the antibiotic resistance in human microbiomes after 180 days in the simulation. Our simulations show that reducing human contacts drives a reduction in the diversity of antibiotic resistance genes in human microbiomes. Kruskal-Wallis and Dunn's pairwise tests show very strong evidence (p < 0.000, adjusted using the Bonferroni correction) of a difference between the four confinement regimes. The proportion of variability in the ranked dependent variable accounted for by the confinement variable was eta(2) = 0.148, indicating a large effect of confinement on the diversity of antibiotic resistance. We have shown that confinement and hygienic measures, in addition to reducing the spread of pathogenic bacteria in a human network, also reduce resistance and the need to use antibiotics.