Background We sought to estimate the prevalence of polypharmacy, the most prevalent drug classes involved, and the prevalence and type of potentially inappropriate prescribing among older male and female patients in family medicine. Methods We conducted a secondary analysis of baseline data from a pragmatic cluster-randomised trial on the efficacy of a screening and management tool for geriatric syndromes among older community-dwelling patients (aged ≥ 75 years) included by 42 family physicians. Information on drug prescription and clinical diagnoses (International Classification of Primary Care-2nd Edition [ICPC-2] coded) were extracted manually from medical records. The prevalence of polypharmacy, defined as the use of at least five permanent oral or parenteral drugs, and of potentially inappropriate medications (PIMs), identified according to 2015 updated Beers criteria, were compared between men and women. Results We included 429 patients (269 women and 160 men; mean age 82.9 and 81.8 years, respectively). Polypharmacy was found in 59.9% of them. Analgesics, antithrombotic agents and agents acting on the renin-angiotensin system were the most frequently prescribed drug categories. Three-quarters of patients (76.7%) were prescribed at least one PIM according to Beers criteria, without difference by sex/gender (p = 0.760). The most frequent PIMs were proton-pump inhibitors used for > 8 weeks, diuretics, benzodiazepines, aspirin for primary prevention, and chronic use of non-steroidal anti-inflammatory drugs. Prescription patterns markedly differed by sex/gender, but the number and patterns of inappropriate prescriptions were comparable overall. Interpretation Both polypharmacy and PIMs were very common in older patients followed regularly in family medicine in Switzerland. Interestingly, most PIMs involved only a limited number of medication classes. Trial registration Clinicaltrials.gov NCT 02618291.