You can try this first:

sudo /usr/bin/profiles -D

If that does not work, try this:

  1. In Recovery mode, select Utilities-> Terminal from the menu bar.

  2. Type csrutil disable and reboot the Mac. This will disable System Integrity Protection (SIP).

  3. Once you have logged in to the Mac, open Terminal and run the following command:
    sudo /bin/rm -rf /var/db/ConfigurationProfiles/Store/*
    (This will remove all profiles)

  4. Exit Terminal & reboot the Mac.

  5. Once the Mac has rebooted open System Preferences-> Profiles.
    You should now be able to remove all of the profiles in the profiles utility. If the Profiles utility is missing, there are no profiles.

  6. Go back in to Recovery mode -> Terminal & type csrutil enable.  This will enable SIP again.

This is what worked for me on a few machines that had locked profiles from a previous MDM. After this I was able to enroll the machine in to JAMF without the need to wipe the machine.