Skip to main content
Question

Removing configuration profiles via command line


Forum|alt.badge.img+3

Has anyone been successful with removing configuration profiles via terminal and not through System Preferences?

4 replies

Forum|alt.badge.img+2
  • New Contributor
  • 12 replies
  • April 15, 2013

You should be able to utilize the profiles command. I'd run "man profiles" in terminal to get more specific information.

profiles -R -F /profiles/testfile2.configprofile Removes the profile file '/profiles/testfile2.mobileconfig' into the current user.


Forum|alt.badge.img+13
  • Contributor
  • 400 replies
  • April 15, 2013

Also you can use this;

Some useful commands
List configuration profile information for the computer (Computer Level)

/usr/bin/profiles -C

List configuration profile information for a particular user, or the current user if no Username was specified (User Level)

/usr/bin/profiles -L

List configuration profile information for everyone.

/usr/bin/profiles -P

Remove a Computer Level Configuration Profile from Command Line
1) List the computer level config profiles with their Identifier ```
/usr/bin/profiles profiles -C

2) Remove using profiles -R -p [identifier]

/usr/bin/profiles -R -p XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
```


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 4 replies
  • April 16, 2013

Thanks bjohnson & kumarasinghe! I tried examples in man profiles before I posted but was unsuccessful. After a few more attempts I was able to figure it out. I did a profiles -L and figured out the correct profileIdentifier (wish it provided more info as I think I kept selecting the wrong one) and finally a profiles -R -p profileIdentifier removed it.


Forum|alt.badge.img+12
  • Valued Contributor
  • 350 replies
  • January 28, 2014

I've been playing with this and have gotten a lot further thanks to this thread. I was able to use sudo profiles -Lv to get a complete listing of the installed profiles. It included the both profile name and the profileIdentifier along with all the settings contained in each profile.

This was done on a 10.8.5 machine.


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