Deleting profiles via terminal in recovery disc.

jpizzino
New Contributor

We've been setting up a lab and 4 of our 10 Mac Minis have old policy profiles on them even after being deleted from the JSS. I've booted into the recovery partition in hopes of using terminal to locate and delete these left over profiles. Normally I'd just re-image them but the teacher has software & files they don't want to lose. Does anyone have any suggestions on how to go from here?

1 ACCEPTED SOLUTION

RobertHammen
Valued Contributor II

Configuration profiles? Were they installed manually or via the JSS?

If you do a

sudo jamf removeMdmProfile

when booted from the normal OS, and the profiles aren't removed, they weren't pushed by the JSS

(sudo jamf mdm will re-do the MDM profiles and any scoped to the client to get them back).

If you have "rogue" profiles that are not removable, you can remove the contents of:

/private/var/db/ConfigurationProfiles
/Library/Managed Preferences

Then restart. You'll need to run the sudo jamf mdm (or possibly sudo jamf enroll -prompt) to re-obtain the MDM and any scoped config profiles on the device.

View solution in original post

4 REPLIES 4

RobertHammen
Valued Contributor II

Configuration profiles? Were they installed manually or via the JSS?

If you do a

sudo jamf removeMdmProfile

when booted from the normal OS, and the profiles aren't removed, they weren't pushed by the JSS

(sudo jamf mdm will re-do the MDM profiles and any scoped to the client to get them back).

If you have "rogue" profiles that are not removable, you can remove the contents of:

/private/var/db/ConfigurationProfiles
/Library/Managed Preferences

Then restart. You'll need to run the sudo jamf mdm (or possibly sudo jamf enroll -prompt) to re-obtain the MDM and any scoped config profiles on the device.

jpizzino
New Contributor

Thanks so much for that! I found another work around by the time I got your response, however we've been able to use it already to help in another issue. Thanks a ton!

timlings
Contributor

Brilliant, thank you!

rbrock
New Contributor

hi,

would it be possible to remove a particular configuration profile in recovery mode or do i have to axe all of them?