How can I clear an old account and register my iPhone with family sharing?

I have an old account with cds on and the passwords email are long forgotten. Can you help me clear old account and sync to family's colection.
Re: get rid of old account and register iphone familys music account

An "old account" where? On what?
You can either factory reset the device (which is what I would recommend if you are setting up a new user on the device) or just delete the account from the Apple ID settings on the device. There should be something under the App Store settings as well as the iCloud account settings that you will need to delete.
Here is a good iMore article on setting up child ID's with family sharing as well.

How to create a new child ID for Family Sharing | iMore

Original thread: https://forums.imore.com/threads/how-can-i-clear-an-old-account-and-register-my-iphone-with-family-sharing.339420/