Duplicated birthdays reflecting many contacts "on my Mac" as well as in iCloud
I generally rely on iCloud for storing contact and event information, and it's very good on iPhone, iPad and Mac. HOWEVER, probably as a legacy of something that went wrong in the past, the Contacts app on my Mac refers BOTH to my iCloud account AND to "On My Mac". Thus if I opt to show 'All Contacts' almost every contact is duplicated. I can work around this problem in the Contacts app by opting to show only iCloud. But the Calendar app picks up birthdays from both sources, and I think this is the reason why I cannot prevent birthdays from being duplicated in the calendar.
The standard Mac OS procedure for removing duplicates doesn't seem to find identical contact records that are in both iCloud and "On my Mac".
I think that I need to remove (or at least hide) all the contacts records that are still in "on my Mac". How do I do this safely? "On my Mac" doesn't seem to be an "account" that can be deleted or hidden.
MacBook Pro 13″, macOS 11.4