LightAtom

How to Forget a Wi-Fi Network on Mac

Remove a saved Wi-Fi network so your Mac stops joining it automatically, or clear a wrong saved password.

networksetup -removepreferredwirelessnetwork en0 "Network Name"

Remove a saved network from the Wi-Fi list (needs admin rights).

beginner2 min

When to use it

Forget a network when your Mac keeps joining a weak or unwanted one, when its password changed and joining fails, or to clear stale settings before troubleshooting.

Steps

  1. Open Wi-Fi settings

    System Settings › Wi-Fi. Saved networks are under Known Networks (or behind Advanced…).
  2. Forget it

    Click ⋯ next to the network and choose Forget This Network…, then confirm.
  3. Or just stop auto-joining

    In the same ⋯ menu, untick Auto-Join to keep the password but stop automatic connection.
  4. Terminal

    Useful for scripts; the name must match exactly.
    networksetup -removepreferredwirelessnetwork en0 "Café Guest"

Output explained

networksetup -listpreferredwirelessnetworks en0 lists saved networks before and after:

Preferred networks on en0:
	Home
	Café Guest

Removing a network deletes it from this list; the password stays in Keychain until you remove it there, but it's no longer used.

Options and variations

FlagMeaningExample
-listpreferredwirelessnetworks IFList saved networksnetworksetup -listpreferredwirelessnetworks en0
-removepreferredwirelessnetwork IF NAMEForget a networknetworksetup -removepreferredwirelessnetwork en0 "Home"
-removeallpreferredwirelessnetworks IFForget all networks (sudo)sudo networksetup -removeallpreferredwirelessnetworks en0

Common errors

ErrorCauseFix
Network comes back after forgetting itiCloud Keychain syncs saved networks from your other devicesForget it on the iPhone or iPad too.
Error: … not found in preferred networksName doesn't match exactlyCopy it from -listpreferredwirelessnetworks.

Do it in the app

LightAtom's connections view shows when connections drop and resume as your Mac switches networks.

Frequently asked questions

How do I forget a Wi-Fi network on a Mac?

System Settings › Wi-Fi › click ⋯ next to the network › Forget This Network. Your Mac stops joining it and forgets its password.

Why does a forgotten network reappear?

iCloud Keychain syncs Wi-Fi networks between your devices. Forget it on your iPhone and iPad as well.

Does forgetting a network delete the password?

It removes the network from your Mac's list so the password isn't used. You'll need to type it again to rejoin.

LightAtom team

The people who build LightAtom, a network monitor for macOS.