There was a situation where I had to delete a Record Type from an Object and Page Layout for that Record Type.
The record type and associated Page layout were not used anymore in our Salesforce Organization. So, the requirement was to remove any references to the record type and delete the record type. Also needed to delete the Page layout associated.
Below Are The Steps to Delete Record Type and Related Page Layout:
1) De-activate the record type.
2) If Record Type is being set as default record type for any of the Profiles, it throws an error to remove its references from the profile.
3) To remove references from Profile, go to Profile > Search for 'Record Type Setting' > Edit and Update default record Type.
Issue comes when we are trying to remove references from Chatter Free User Profile, Chatter External User Profile, Chatter Moderate User Profile.
Important Note: Chatter free User Licenses are basically for the users who do not have Salesforce licenses but want to have access to Chatter in Salesforce.
These users do not have access to Salesforce Objects or data. The chatter-free users can have access to chatter functionalities such as people, files, Profiles, and groups. That is the main reason why Chatter User profiles do not have 'Record Type Setting' on the Object inside the Profile.
4) These profiles do not have 'Record Type Setting' on the Object inside the Profile.
Because of these references on Chatter profiles, it makes it difficult to delete a Record Type from an Object and Page Layout.
5) Here is the hack for this problem through which we can remove the default record type on these Chatter Profiles
6) Get the Id of the Profile: AAAAAAAA
7) Get the Id of the Object: BBBBBBBBB
Check out another amazing blog by Sharath Chandra here: Deleting Apex Classes / Apex Triggers From Production Using Workbench | Salesforce Tutorial
8) Get the Name of the Profile: Chatter Free User
9) Get the Instance URL from the browser: https://testInstance.lightning.force.com/
10) Now replace the data in the hack URL and open the link in the browser: https://testInstance.lightning.force.com/setup/ui/profilerecordtypeedit.jsp?id=AAAAAAAA&tid=BBBBBBBBB&pn=Chatter+Free+User
11) This opens up the Record Type edit page where we can update the default record type and choose available record types.
Whenever we are trying to delete a record type on a particular object, it will ask us to choose another record type as the default record type.
Same with the Page Layout, we need to delete a page layout and choose an alternate Page layout.
Once all the steps are executed we can easily delete the record type and page layout associated with that record type we are trying to delete.
Hope this helps.
Sharath Chandra Varkole.