Can't delete NextDNS profile from macOS Network Preferences
I don't know why but I've mess something and now I'm unable to delete the nextdns profile from network prefs in macOS. I think I have deleted the profile without turning off the dns service, so I've found the plist file but I'm unable to delete it.
I've already tried to install a new profile, then delete it and see if it deletes both the new and old dns profile, but no, it deletes only the new profile and its related dns preference. Not the old, even if I made a new profile with the same details as the old one.
Any help? Thanks
30 replies
-
Still happening on macOS 13.5 beta on a M1 MacMini
-
Like many of you, mine persisted even after deleting. I went to apple.nextdns.io, downloaded another profile (named it in all lowercase so I know it's a new profile), installed it, then deleted it. Rebooted computer and no more traces of the old profile (or the new profile). This is with macOS 14.3.
-
I have the same error with MacOS 15.5 on an M4. The solution is this script.
#!/bin/bash PLIST="/Library/Preferences/com.apple.networkextension.plist’ BACKUP="$PLIST.bak’ echo ‘📦 Create backup...’ [ -e ‘$BACKUP’ ] || cp ‘$PLIST’ ‘$BACKUP’ && echo ‘✅ Backup created: $BACKUP’ echo ‘📖 Search plist for NextDNS...’ /usr/libexec/PlistBuddy -c ‘Print’ ‘$PLIST’ 2>/dev/null | grep -i nextdns | while read -r line; do key=$(echo ‘$line’ | awk -F= ‘{print $1}’ | xargs) echo ‘🗑️ Remove key: $key’ /usr/libexec/PlistBuddy -c ‘Delete :$key’ ‘$PLIST’ 2>/dev/null done sudo launchctl kickstart -k system/com.apple.nehelper echo ‘✅ Done.’ -
Nothing of the above and much more effort (AI trips to other universes) didn't help.
But this little scripts did (with a little help from ChatGPT), to execute in the terminal:1. profiles list
Result was the profile name.
2. profiles remove -identifier io.nextdns.########.profile
(######## = profile number)
deleted it, as a test with
3. profiles list
proved that there is no profile existing anymore -
On a 2nd Mac a similar problem: two old entries.
But the solution above won't work, because no profile was found after "profiles list".
Here the solution (with a little help from ChatGPT):
/Library/Preferences/com.apple.networkextension.plist
has 7 entries with "NextDNS"
I finally dared to just delete all entries in this plist that contained “nextdns”.
After a restart, they were gone—the leftover file remnants.
One step after the other:
The plist is protected, therefore:
1. Start Mac in Recovery-Mode.
2. Open Terminal from menu.
3. Deactivate SIP with "csrutil disable"
4. New start.
5. Copy the file com.apple.networkextension.plist from /Library/Preferences/ to desktop.
(a copy in an Folder for security would be a good idea)
6. Open com.apple.networkextension.plist on desktop with a tool (I used Xcode).
7. Find (CMD F) "nextdns" in the $Objects-array. Delete all entries with the search string.
8. Save file.
9. Copy the file back to /Library/Preferences/ and overwrite the old one.
(works, because SIP is inactive)
10. New start in Recovery-Mode.
11. Open Terminal from menu.
12. Activate SIP again with "csrutil enable"
13. New start.
It works wonderfully, even with the most stubborn orphaned NextDNS entries.
But take care with M-CPU Macs: New start in recovery mode please take time:
After the click in Options and booting: wait for some seconds for the Mac identifies
itself via Firmware @ Apple. Otherwise "csrutil enable" gives an error.
With patience all works fine
Content aside
-
7
Likes
- 12 hrs agoLast active
- 30Replies
- 5374Views
-
18
Following
