function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BabaganoushBabaganoush 

Removing some references to deprecated objects in profiles result in metadata deploy operation to fail

I removed references to a deprecated object's layout from profiles.
Basically removal of the following:
 
<layoutAssignments>
        <layout>Deprecated Object Layout</layout>
    </layoutAssignments>
results in a failure and looking at the logs I see 3 culprits:
1). Guest License User.profile
 
Error: You may not modify the permission Remove People from Direct Messages while editing a Standard Profile

I know that it is referring to API name 'RemoveDirectMessageMembers' but I dont see that anywhere in the profile.
2). CMManager.profile
 
Error: You can't create, edit, or delete records for this permission set parent because it's associated with a standard profile. Parent ID: JKF15000000Ob7e

I googled this and while there were a few articles on this type of error, I will be honest I am not fully clear.
3). SMManager.profile
Error: You can't create, edit, or delete records for this permission set parent because it's associated with a standard profile. Parent ID: JKF15000000Ob7e

Same as above.
I did :
 
select Id, name, label from permissionset where id = 'JKF15000000Ob7e' or id = 'JKF15000000Ob7e'

And I see two permission sets like :
X00ex00000018ozX_128_09_43_34_5 and X00ex00000018ozX_128_09_43_34_7
Yet I do not see them in the UI. I researched further (https://help.salesforce.com/articleView?id=000339288&type=1&mode=1) and read that permission sets that start with an X do not exist and are actually profile ID's. But X00ex00000018ozX_128_09_43_34_5 and X00ex00000018ozX_128_09_43_34_7 do not look like ID's to me.
I have not seen these errors before. I guess I just need to understand what the problem is because the error messages dont really tell me anything actionable. Any tips?
 
SwethaSwetha (Salesforce Developers) 
HI Babaganoush,
Can you share the steps you followed to deprecate and remove the references to the deprecated object's layout so I can try and suggest better?

Related:
https://salesforce.stackexchange.com/questions/88512/deprecate-fields-in-standard-object-user
https://salesforce.stackexchange.com/questions/236107/getting-error-you-may-not-modify-the-permission-manage-customer-users-while-edi

Thanks