Skip to content

Instantly share code, notes, and snippets.

@xxKRASHxx
Created April 17, 2024 10:37
Show Gist options
  • Save xxKRASHxx/689adab5a226a37e1e4a2a053eaeb7b7 to your computer and use it in GitHub Desktop.
Save xxKRASHxx/689adab5a226a37e1e4a2a053eaeb7b7 to your computer and use it in GitHub Desktop.
Reset app permissions on MacOS
  1. Start terminal and then sudo to a root shell
    sudo -s

  2. Go to /var/db/locationd
    cd /var/db/locationd

  3. Make a backup of the clients.plist file
    cp -p clients.plist clients.plist.save

  4. Convert clients.plist to xml (editable format)
    plutil -convert xml1 clients.plist

  5. Use vi (vim) / nano to edit the clients.plist file and remove the application.
    vi clients.plist or nano clients.plist

  6. Convert the clients.plist file back to binary
    plutil -convert binary1 clients.plist

  7. Restart locationd
    killall locationd
    If the apps are still there, do the process again, except restart locationd using kill -9 after determining the PID as follows: ps -ef | grep locationd | grep -v grep (The PID is the second field in the ps output)
    Output: 205 427 1 0 6:31PM ?? 0:00.07 /usr/libexec/locationd
    kill -9 427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment