Are the profiles installed by the JSS? If so, this should take care of it too. For whatever reason it's not documented.
sudo jamf removemdmprofile
Unfortunately, it was another MDM solution so that option would not help there. Thanks for sharing though.
Have you seen whether this script can remove a profile that has the "remove-never" flag set in the General payload section under Security?
Yes it will remove them, despite the error notice.
I've been using the one below that I found searching around here:
!/bin/bash
Get UUID of requested MDM Profile
MDMUUID=profiles -Lv | grep "name: $4" -4 | awk -F": " '/attribute: profileIdentifier/{print $NF}'
Remove said profile, identified by UUID
if [[ $MDMUUID ]]; then
profiles -R -p $MDMUUID
else
echo "No Profile Found"
fi
sleep 5
I have a policy for each MDM profile installed by our previous management suite. Had good luck so far.
When attaching a script be sure to use the >_ button and paste the script inside the quotes so that it preserves formatting.
#!/bin/sh
#!/bin/sh
profiles remove -forced -all