Skip to main content
Solved

Deleting profiles via terminal in recovery disc.

  • October 6, 2015
  • 4 replies
  • 51 views

Forum|alt.badge.img+4

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?

Best answer by RobertHammen

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.

4 replies

RobertHammen
Forum|alt.badge.img+29
  • Esteemed Contributor
  • Answer
  • October 6, 2015

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.


Forum|alt.badge.img+4
  • Author
  • New Contributor
  • October 8, 2015

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!


Forum|alt.badge.img+7
  • Contributor
  • November 15, 2016

Brilliant, thank you!


Forum|alt.badge.img
  • New Contributor
  • July 8, 2019

hi,

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