The commands below will remove the settings from the Ethernet and Wi-Fi interfaces.  You can lookup more features using the man command for networksetup.  IE.. man networksetup

networksetup -setsearchdomains "Wi-Fi" "Empty"

networksetup -setdnsservers "Wi-Fi" "Empty"

networksetup -setdnsservers "Ethernet" "Empty"

networksetup -setsearchdomains "Ethernet" "Empty"