The increased incidence of COVID-19 cases and deaths in Spain in March 2020 led to the declaration by the Spanish government of a state of emergency imposing strict confinement measures on the population. The objective of this study was to characterize the nasopharyngeal microbiota of children and adults and its relation to SARS-CoV-2 infection and COVID-19 severity during the pandemic lockdown in Spain. This cross-sectional study included family households located in metropolitan Barcelona, Spain, with one adult with a previous confirmed COVID-19 episode and one or more exposed co-habiting child contacts. Nasopharyngeal swabs were used to determine SARS-CoV-2 infection status, characterize the nasopharyngeal microbiota and determine common respiratory DNA/RNA viral co-infections. A total of 173 adult cases and 470 exposed children were included. Overall, a predominance of Corynebacterium and Dolosigranulum and a limited abundance of common pathobionts including Haemophilus and Streptococcus were found both among adults and children. Children with current SARS-CoV-2 infection presented higher bacterial richness and increased Fusobacterium, Streptococcus and Prevotella abundance than non-infected children. Among adults, persistent SARS-CoV-2 RNA was associated with an increased abundance of an unclassified member of the Actinomycetales order. COVID-19 severity was associated with increased Staphylococcus and reduced Dolosigranulum abundance. The stringent COVID-19 lockdown in Spain had a significant impact on the nasopharyngeal microbiota of children, reflected in the limited abundance of common respiratory pathobionts and the predominance of Corynebacterium, regardless of SARS-CoV-2 detection. COVID-19 severity in adults was associated with decreased nasopharynx levels of healthy commensal bacteria.