Before you clear the network settings, be sure to disable Wi-Fi on the machine you're using. Click the wireless icon in the menu bar, and choose Turn Wi-Fi Off from the menu.
Open Finder and then type Command+Shift+G to open the following directory:
In the SystemConfiguration folder, locate and delete the following files:
You can delete the files by right-clicking on the file name and clicking Move to Trash.
If you want to avoid any issues, you can always make a backup of these files. When you're ready to clear your network settings, delete the files.
This short guide will show you how to delete, or "forget," a saved wireless network from your Raspberry Pi. This is useful for changing networks or troubleshooting connectivity issues.