7

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

26 replies

null
    • olivier
    • 2 yrs ago
    • Reported - view

    Looks like a macOS bug. Which version of macOS are you running?

      • Giulio_Magnifico
      • 2 yrs ago
      • Reported - view

      Olivier Poitrey Latest 11.3 from yesterday but also before the latest upgrade with 11.2.3 I was unable to delete it.

      Also to me looks a macOS bug...but now? How can I delete this old nextdns DNS profile? Do you have an idea? Thanks :)

      • olivier
      • 2 yrs ago
      • Reported - view

      Giulio Magnifico first time I see that so I’m not sure. You may want to report this to Apple.

    • Dan1234
    • 2 yrs ago
    • Reported - view

    Have you tried temporarily disabling SIP? That should allow you to delete any file.

    https://www.macworld.co.uk/how-to/how-turn-off-mac-os-x-system-integrity-protection-rootless-3638975/

    • If in doubt, ask someone to help!
    • Terry_Webbs
    • 2 yrs ago
    • Reported - view

    Giulio Magnifico

    That type of profile is stored in a different location

    Got to System Preferences>Profiles

    and remove it from there ........

    EDIT: sorry my bad you already tried that!

    Have you simply tried restating the mac to see if it clears out the old network dns?

    In your network screen when the NextDNS is selected what options do you get clicking on the down arrow along side the + and -        to the bottom?

    • If in doubt, ask someone to help!
    • Terry_Webbs
    • 2 yrs ago
    • Reported - view

    Giulio Magnifico

    HOW to manually remove a network service from a Mac

    In Terminal type networksetup -removenetworkservice “yournetworkservice”

    Instead of yournetworkservice, type the name of the network service you want to remove from your macOS device, using quotation marks. If you are not sure about its correct name, you can find it in the list of your network services.

    To view this list, go to Terminal: networksetup -listallnetworkservices

    Make sure that you typed the name of the network service exactly in the same way as it appears in the list.

    To ensure that the network service is removed on your macOS, you can view the list of network services again:

    Terminal: networksetup -listallnetworkservices

     

    Note. Only Terminal is required, no XCode. The .plist will update automatically; you don’t need to copy or delete it. The remove command bypasses the GUI and removes the service whether or not the  button is greyed out.

      • Giulio_Magnifico
      • 2 yrs ago
      • Reported - view

      Terry Webbs Thanks but I don't have the NextDNS profile listed, I don't know why...

    • Jack_Stiekema
    • 2 yrs ago
    • Reported - view

    The software was deleted but the service can not be removed:

    xxxxxxx@Mini-van-JEJ ~ % networksetup -listallnetworkservices             

    An asterisk (*) denotes that a network service is disabled.

    Ethernet

    Ethernet Adaptor (en4)

    Ethernet Adaptor (en5)

    Wi-Fi

    Bluetooth PAN

    Thunderbolt Bridge

    NextDNS

    xxxxxxx@Mini-van-JEJ ~ % networksetup -removenetworkservice "NextDNS"

    You cannot remove NextDNS because there aren't any other network services on IPv4.

    ** Error: The parameters were not valid.

    • Shaun_Campbell
    • 2 yrs ago
    • Reported - view

    Olivier Poitrey Please help resolve this problem?

    • If in doubt, ask someone to help!
    • Terry_Webbs
    • 2 yrs ago
    • Reported - view

    Shaun Campbell Lilac Kite Giulio Magnifico

    Make sure System Preferences and any other software that may attempt to switch network locations is quit before beginning.

    Make a backup of the preferences file.
    cd /Library/Preferences/SystemConfiguration
    sudo cp preferences.plist preferences.plist.old

    Give yourself permissions to the preference file.
    sudo chown $USER preferences.plist
    sudo chmod u+w preferences.plist

    Now you should be able to remove the plist file as attempted in the first post!!!

    if it still fails, you might need to remove it using terminal with the sudo command at the beginning...
    Always use sudo with caution

     

    1.  
      • Giulio_Magnifico
      • 2 yrs ago
      • Reported - view

      Terry Webbs 

      Thanks but unfortunately still doesn't work due to permission error:

      Home@Giulio-MacBook-Air ~ % cd /Library/Preferences/SystemConfiguration
      Home@Giulio-MacBook-Air SystemConfiguration % sudo cp preferences.plist preferences.plist.old
      Password:
      Home@Giulio-MacBook-Air SystemConfiguration % sudo chown $USER preferences.plist
      Home@Giulio-MacBook-Air SystemConfiguration % sudo chmod u+w preferences.plist
      Home@Giulio-MacBook-Air SystemConfiguration % sudo rm /Library/Preferences/com.apple.networkextension.plist
      override rw-r--r--  root/wheel for /Library/Preferences/com.apple.networkextension.plist? yes
      rm: /Library/Preferences/com.apple.networkextension.plist: Operation not permitted
      Home@Giulio-MacBook-Air SystemConfiguration %
    • If in doubt, ask someone to help!
    • Terry_Webbs
    • 2 yrs ago
    • Reported - view

    Giulio Magnifico

    You will need to grant Terminal with Full Disk Access privileges in security & privacy

    Open Security & Privacy in System Preferences. Click the Privacy tab, select Full Disk Access and add Terminal to the list of applications. You'll likely have to unlock that screen first by clicking the padlock at the lower left corner.

    Another alternative: if you have Time Machine backup working
    Try to restore the plist file back before the time the profile was updated

      • Giulio_Magnifico
      • 2 yrs ago
      • Reported - view

      Terry Webbs I've already done it, but the error is always there, I think I have to disable the SIP when in recovery mode, because the plist file is protected (I'm using an ARM MacBook and the filesystem is a bit different)

      Home@Giulio-MacBook-Air ~ % sudo rm /Library/Preferences/com.apple.networkextension.plist
      Password:
      override rw-r--r--  root/wheel for /Library/Preferences/com.apple.networkextension.plist? yes
      rm: /Library/Preferences/com.apple.networkextension.plist: Operation not permitted
      Home@Giulio-MacBook-Air ~ %
      • If in doubt, ask someone to help!
      • Terry_Webbs
      • 2 yrs ago
      • Reported - view

      Giulio Magnifico 

      Yep disabling SIP would be the next step - hopefully that will sort it once and for all!
      This method is shown in a link near the top of this thread - posted by Dan1234

      Lets us all know how you get on!

      • Giulio_Magnifico
      • 2 yrs ago
      • Reported - view

      Terry Webbs  Since I've broken (😫) the display of my M1 MBA, I'm waiting for a new one, then I'll use migration assistant to restore my old config and I'm curious to see if this "ghost networks pref" will be still there. 

      I've to wait 10-15 days for a new MBA CTO (16GB ram) then I'll update the discussion here.

      Thanks for you help untill now 👍

    • Pro Subscriber
    • Daniel_Giorgio
    • 2 yrs ago
    • Reported - view

    Same problem here, macOS 11.4 (20F71). Is there any fix for this?

    • Pro Subscriber
    • Daniel_Giorgio
    • 2 yrs ago
    • Reported - view

    1 CMD+R —> Recovery —> Terminal —> csrutil disable

    2 Reboot and delete the file com.apple.networkextension.plist and reboot again

    3 Shutdown and boot into recovery CMD+R. —> Terminal —> csrutil enable

    4 Reboot into normal os and swear on Apple’s bug.

      • Giulio_Magnifico
      • 2 yrs ago
      • Reported - view

      Daniel Giorgio yeah thanks, this worked, I've done it some weeks ago since restoring from Time Machine, also without import "Network Configuration" didn't fix it.

      Anyway this will remove all your network VPN/other NextDNS settings/etc... (not the the Network preferences obviously)

      • Maki
      • 2 yrs ago
      • Reported - view

      Daniel Giorgio Thank you so much, this worked for me too. I recently migrated my M1 MacBook to the new M1 Pro and somehow NextDNS was in the network settings without any profiles installed.

    • RSusanto
    • 1 yr ago
    • Reported - view

    Guys, you are looking at the wrong place. Instead of System Preferences > Network, go to System Preferences > Profiles. You will find your NextDNS profile there and there is a button to remove it (which is not disabled).

    Not sure if there is any difference on previous macOS versions, but it is there on Monterey :)

      • Maki
      • 1 yr ago
      • Reported - view

      Rudy Susanto No, the profile wasn't anywhere to be found for me. It was definitely a macOS bug, like a Schrödinger's dns profile or something haha. Completely resetting network settings with the terminal was the only way to unlock my dns settings again

      • Victor.3
      • 6 mths ago
      • Reported - view

       on Sonoma Beta, this worked for me.

      • TheRiceKing
      • 6 mths ago
      • Reported - view

       This was the solution for me. Thank you!

    • Tomas_Svec
    • 1 yr ago
    • Reported - view

    Unfortunately this bug is still present even today, more than a year later it is not fixed and some regular webpages like our company website not loading for me 😞

    • Random_Bob
    • 8 mths ago
    • Reported - view

    Still happening on macOS 13.5 beta on a M1 MacMini  

Content aside

  • 7 Likes
  • 1 mth agoLast active
  • 26Replies
  • 2932Views
  • 15 Following