Skip to main content
Question

Remove Individual OS X Configuration Profile via Command Line


Show first post

39 replies

Forum|alt.badge.img+1
  • New Contributor
  • 6 replies
  • May 15, 2019

Remove All Profiles
sudo /usr/bin/profiles -D

Remove a Single Profile
sudo /usr/bin/profiles -R -p com.eugene.


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • June 3, 2019

Hi guy, just new and need this help, I got a Mac that is not showing any profile, how ever if I format it I get the corporate login page if connected to internet, if I disable the connection then I can go ahead and go through the activation, I've contacted the supplier but they haven't tested and now is out of the 3 months warranty they offered :(
stunning Mojave if that help, I can use it but I would like to have it as a normal MacBook..
any help much appreciated
thanks in advance!!


Forum|alt.badge.img+1
  • New Contributor
  • 6 replies
  • June 18, 2019

HI Fredor Are you perhaps describing login profiles ? (User Profiles) ?


garybidwell
Forum|alt.badge.img+15
  • Jamf Heroes
  • 170 replies
  • June 18, 2019

This doesn't sound like a config profile, It sounds like your getting a DEP enrolment screen.

This can only be removed by the company shown in the screen - go back to the vendor you purchased this from, as without this being removed before sales the laptop is just a aluminium brick


Forum|alt.badge.img+1
  • New Contributor
  • 3 replies
  • July 23, 2019

sudo /usr/bin/profiles -D -f
To delete all profiles on the Mac without getting a prompt of "are you sure?" (forced)


donmontalvo
Forum|alt.badge.img+36
  • Legendary Contributor
  • 4293 replies
  • November 18, 2019

Regarding Configuration Profiles was installed by Jamf Pro (not what the original poster was asking, but was asked elsewhere in this thread), it'll be enforced.

Meaning you can't remove it without it re-installing again. The only way to remove would be to exclude the computer(s).


Forum|alt.badge.img+11
  • New Contributor
  • 14 replies
  • November 18, 2019

Adding to what @donmontalvo mentioned above, you can send the command to remove the MDM profile. That'll also remove other profiles deployed and controlled by the MDM.


scottb
Forum|alt.badge.img+18
  • Valued Contributor
  • 1285 replies
  • November 18, 2019

@waqas.khan - that's one of those I forget to use! Thanks for the reminder...


Forum|alt.badge.img+1
  • New Contributor
  • 2 replies
  • December 4, 2019

To easily remove ALL profiles from a managed mac, do the following:
1. Turn of system integrity.
Shut down the computer.
Boot up the computer while holding (command + R)
Press ‘utilities’.
Type (csrutil disable)
Restart
2. Give terminal root file access.
Open ‘Privacy and Security’ in ‘System Preferences’.
Press ‘Privacy’
Press ‘Complete Disk Access’
Unlock with the lock button at the bottom left
Add terminal.
3. Terminal Commands
Type: ‘sudo jamf -removeFramework’ into terminal, press enter.
Type: ‘sudo -i’ into terminal, press enter and enter your password, press enter.
Type: ‘cd /var/db/‘ into terminal, press enter.
Type: ‘mv ConfigurationProfiles ConfigurationProfilesOLD’ into terminal, press enter.
Type: ‘logout’ into terminal, press enter.
4. Final steps.
Restart computer.


Forum|alt.badge.img+1

@bbot your script worked great when I used it locally, but trying to run it as a script from jamf pro it complained about -U needing an option to be passed to it. I tried user= and also just using $USER but I had no luck with either. If I hard-coded their username then it worked as long as they were logged in. Otherwise I got an error that the user wasn't logged in. Has anybody figured out a way to use this with a variable? maybe a specific uid?


Forum|alt.badge.img
adambrest wrote:

To easily remove ALL profiles from a managed mac, do the following:
1. Turn of system integrity.
Shut down the computer.
Boot up the computer while holding (command + R)
Press ‘utilities’.
Type (csrutil disable)
Restart
2. Give terminal root file access.
Open ‘Privacy and Security’ in ‘System Preferences’.
Press ‘Privacy’
Press ‘Complete Disk Access’
Unlock with the lock button at the bottom left
Add terminal.
3. Terminal Commands
Type: ‘sudo jamf -removeFramework’ into terminal, press enter.
Type: ‘sudo -i’ into terminal, press enter and enter your password, press enter.
Type: ‘cd /var/db/‘ into terminal, press enter.
Type: ‘mv ConfigurationProfiles ConfigurationProfilesOLD’ into terminal, press enter.
Type: ‘logout’ into terminal, press enter.
4. Final steps.
Restart computer.


Hi @adambrest

i’m just gonna shoot straight. I think I purchased a MacBookPro in 2017 that is somehow registered to the Govmt. It was brand new, still in the unbroken cello when I got it off of eBay. 

I just picked it up from Apple where they replaced the logic board and keyboard as a part of a recall. The serial number must have come up showing the device as a part of a Govmt agency. 

Upon boot, I select language, nation, keyboard and WiFi (I’ve also bi-passed WiFi) and the next screen is “Configuration Available. This Mac will be configured automatically by _____.” (I can fill in the blank in an offline discussion)

if I choose -> Continue, I am then asked for log-in credentials which I obviously do not have. 

Would you be willing to tell me or help me bypass this? Is it possible? 


Forum|alt.badge.img+2
  • New Contributor
  • 10 replies
  • January 20, 2022
dstranathan wrote:

Related question: When a configuration profile has been removed from a JAMF Managed Mac manaully (command or script), will the profile get reinstalled automatically via MDM at some point (assuming the target Mac is still scoped for that particular profile etc)?


From our experience and with JAMF support on a call if you want to remove a config profile, the best approach to remove the devices from the scope, is to let it sit for a day, circle back validate config profile not showing on the devices, when all devices are not showing, finally disable the config profile and later delete it within JAMF.


donmontalvo
Forum|alt.badge.img+36
  • Legendary Contributor
  • 4293 replies
  • January 21, 2022
CarlStockslager wrote:

Hi @adambrest

i’m just gonna shoot straight. I think I purchased a MacBookPro in 2017 that is somehow registered to the Govmt. It was brand new, still in the unbroken cello when I got it off of eBay. 

I just picked it up from Apple where they replaced the logic board and keyboard as a part of a recall. The serial number must have come up showing the device as a part of a Govmt agency. 

Upon boot, I select language, nation, keyboard and WiFi (I’ve also bi-passed WiFi) and the next screen is “Configuration Available. This Mac will be configured automatically by _____.” (I can fill in the blank in an offline discussion)

if I choose -> Continue, I am then asked for log-in credentials which I obviously do not have. 

Would you be willing to tell me or help me bypass this? Is it possible? 


If the computer is in Apple Business Manager, you're kind of SOL, unless you never ever connect it to the internet. 😉


Jaykrishna1
Forum|alt.badge.img+7
  • Jamf Heroes
  • 81 replies
  • February 3, 2023

You can remove an individual OS X configuration profile using the profiles command line utility. Here are the steps to remove a configuration profile from the command line:

  1. Open Terminal.

  2. Type the following command to list the installed configuration profiles:

     
    profiles -P
  3. Identify the profile you want to remove by its name or identifier.

  4. Type the following command to remove the profile, replacing "PROFILE_IDENTIFIER" with the actual profile identifier:

     
    profiles -R -p PROFILE_IDENTIFIER
  5. The profile should now be removed from the device.

Note: The profiles utility is a built-in command line tool in OS X and is used to manage configuration profiles on a Mac. The above steps are meant to be performed on a device that is managed by Jamf.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings