Forget a saved Wi-Fi network on MacBook, iMac or another device from Apple It may be needed in a variety of situations: from a simple change of password on a router to the need to clear the list of networks after moving. Unlike Windows or Android, where deleting a network takes a couple of clicks, macOS offers several ways - from a simple interface to working with Terminal and system storage Keychain AccessHowever, not all users are aware that simply clicking "Forget Network" in the Wi-Fi menu does not always completely erase the connection data.
In this article we will look at Three official methods for deleting Wi-Fi networks on Mac, including hidden nuances that can prevent successful removal. You'll learn how to clean up the network list using the graphical interface, why manual editing of system files is sometimes required, and what to do if macOS stubbornly continues to connect to the old network despite all your efforts. And also, how to avoid common mistakes that lead to problems connecting to new networks.
Method 1: Deleting a network via the Wi-Fi menu (the easiest)
If you need to quickly remove a network you're currently connected to, the most obvious way is to use the Wi-Fi icon in the menu bar. This method works on all versions. macOS from Mojave to Sonoma (and newer), but has a limitation: it only removes active connection, and not all saved networks.
Here are the step-by-step instructions:
- 📶 Click on the icon Wi-Fi in the upper right corner of the screen (next to the clock).
- 🔍 Find the network you want to delete in the list and hover over it.
- ❌ A cross will appear next to the network name - click on it.
- 🗑️ In the window that appears, confirm the action by clicking
Forget.
After that Mac will no longer automatically connect to this network. However, This method does not remove the password from the system storage. Keychain Access, which may lead to conflicts when reconnectingIf you plan to connect to this network again with a new password, it is better to use method #2 or #3.
☑️ Checking after deleting a network
Method 2: Complete removal via System Preferences (recommended)
A more reliable way is to delete the network through the section System Preferences → NetworkHere you can manage all saved networks, not just active ones. This method is guaranteed to clear both passwords and connection settings.
How to do it:
- Open
System Preferences(gear icon in Dock or through → System Preferences). - Go to the section
Net. - In the left menu, select
Wi-Fi, then pressAdditionally...in the lower right corner. - In the window that opens, go to the tab
Wi-Fi. - On the list
Well-known networksFind the network you need, select it and click–(minus) below the list. - Confirm deletion by clicking
Delete. - Click
OK, thenApplyto save the changes.
This method removes all network data, including the password from Keychain, which eliminates problems when reconnecting. If the network still appears in the list after deleting it, check whether you connected to it through Guest mode or Internet access.
Method 3: Uninstall via Terminal (for advanced users)
If the graphical methods don't work or you prefer to work with the command line, you can delete the network via TerminalThis method is useful when you need to clean several networks at once or automate the process.
Here are the commands you will need:
- Open
Terminal(throughSpotlightorPrograms → Utilities). - Enter the command to see a list of all saved networks:
networksetup -listpreferredwirelessnetworks en0(Where
en0- standard Wi-Fi interface; if you have several adapters, check them throughnetworksetup -listallhardwareports). - To remove a specific network (eg.
MyWiFi), run:networksetup -removepreferredwirelessnetwork en0 "MyWiFi" - Verify that the network has been removed by re-running the command from step 2.
This method does not remove passwords from Keychain Access, therefore, for complete cleaning, it is recommended to additionally use method No. 4.
What should I do if the Terminal displays the error "Could not find network port"?
This means you've specified the wrong Wi-Fi interface. To find the correct one, run the command networksetup -listallhardwareports and find the line with Wi-Fi or AirPort. Usually it is en0 or en1, but on some models (for example, Mac Pro with multiple adapters) may differ.
Method 4: Clearing Passwords in Keychain Access (for Complete Removal)
Even after deleting a network through settings, its password may remain in the system storage. Keychain AccessThis leads to the fact that macOS attempts to connect to the network with an outdated password or returns an authentication error. To avoid this, you need to manually delete the entry from Keychain.
Instructions:
- 🔑 Open
Keychain Access(throughSpotlightorPrograms → Utilities). - 🔍 Enter the name of the Wi-Fi network in the search bar.
- 📄 In the results, find a record with the type
AirPort network password(or similar). - 🗑️ Select the entry, right-click and select
Delete. - 🔒 Enter your administrator password to confirm.
If you don't find an entry by network name, try searching by router name (for example, TP-Link_1234) or SSID. Sometimes macOS saves data under a slightly modified name.
Solving common problems after network removal
Even after successfully deleting a network, users often encounter unexpected problems. Here are the most common ones and how to solve them:
| Problem | Possible cause | Solution |
|---|---|---|
| Mac automatically connects to the remote network | The password remains in Keychain or the network is saved in a configuration profile | Remove password via Keychain Access (method #4) and check the profiles in System Preferences → Profiles |
| I can't connect to a new network after deleting the old one. | IP address conflict or DNS cache | Reset network settings via Terminal:
or flush DNS:
|
| The network disappeared from the list, but reappears after a reboot. | Network added via Configuration profile (for example, corporate) | Check it out System Preferences → Profiles and delete unnecessary profiles |
| Mac It asks for a password for a network that I deleted. | Password saved in iCloud Keychain and syncs with other devices | Turn off password syncing in System Preferences → Apple ID → iCloud → Keychain or remove the password on all devices |
If none of the methods helped, try reset the Wi-Fi module:
- 🔄 Turn off Wi-Fi in the menu.
- 🔌 Turn it off Mac from the power supply (if it’s a laptop, remove the charger).
- ⏱️ Wait 30 seconds.
- 🔋 Plug in the power and turn on Wi-Fi again.
How to prevent automatic connections to unnecessary networks
To Mac To avoid automatically connecting to random or unsecured networks, configure your Wi-Fi settings in advance. Here are some helpful tips:
- 🔒 In the section
System Preferences → Network → Wi-Fi → AdvanceduncheckAutomatically join this networkfor all dubious networks. - 📡 Disable the feature
Automatically join known networksin the same settings. - 🛡️ Use VPN to protect traffic on public networks (e.g. NordVPN or ProtonVPN).
- 🔄 Regularly clear your list of known networks, especially if you often visit different places (hotels, cafes, airports).
If you frequently connect to public Wi-Fi, consider using guest mode V macOS (through System Preferences → Users & Groups → Guest User). This will isolate the guest's network settings from your main account.
Security: Why it's important to remove unnecessary Wi-Fi networks
Many users don't pay attention to saved Wi-Fi networks, but it can become security vulnerabilityHere's why it's worth cleaning the list regularly:
- 🕵️♂️ Data leak: If your Mac automatically connects to an open or poorly protected network, allowing attackers to intercept traffic (for example, email or social media passwords).
- 🔑 Old passwords: Saved networks with outdated passwords may block connections to updated networks (for example, after changing the router).
- 📍 Location tracking: The list of known networks can be used to determine your frequently visited locations (especially relevant for corporate devices).
- 🦠 Attacks through fake networks: Attackers can create a network with a name similar to the saved one (for example,
Starbucks_Freeinstead ofStarbucks_WiFi) to trick your Mac connect.
Recommended check the list of saved networks every 2-3 months and delete those you haven't used in a while. This is especially true for public networks in cafes, airports, or hotels.
⚠️ Attention: Starting from macOS Ventura, Apple Changed the logic for storing network settings. Now some parameters are synchronized via iCloud, so deleting a network on one device may not affect others (for example, on iPhone or iPad). To completely remove the network from the ecosystem Apple, do this on all devices.
FAQ: Frequently asked questions about deleting Wi-Fi networks on a Mac
Is it possible to delete all saved Wi-Fi networks at once?
Yes, but only through Terminal. Run the command:
networksetup -setairportnetwork en0 off && networksetup -removepreferredwirelessnetwork en0 [network_name]
To delete all networks, first get a list of them (method #3), then delete each one in a loop. Or use a script:
networksetup -listpreferredwirelessnetworks en0 | grep -v "^$" | tail -n +2 | while read net; do networksetup -removepreferredwirelessnetwork en0 "$net"; done
⚠️ Attention: This script will remove All saved networks without the possibility of recovery!
Why after deleting the network Mac still connects to it?
Most likely the network was added through configuration profile (for example, corporate or from a provider). Check:
System Preferences → Profiles.- Remove profiles associated with this network.
- Reboot Mac.
If there are no profiles, check Keychain Access for duplicate records.
How do I delete a network if it's not in the "Known Networks" list?
If the network is not displayed in System settings, But Mac It connects to it, try:
- Check it out Keychain Access for the presence of hidden records (method No. 4).
- Perform in
Terminal:sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plistand reboot Mac.
- If the network is added via VPN or PPPoE, check the settings in
System Preferences → Network.
Is it possible to restore a deleted Wi-Fi network?
No, after deleting through System Preferences or Terminal It's impossible to restore the network. You'll have to re-enter the password the next time you connect.
Exception: if the password is synced via iCloud Keychain, it can be saved on your other devices (for example, iPhone).
How to ban Mac automatically connect to new networks?
Open System Preferences → Network → Wi-Fi → Advanced And:
- Uncheck the box
Automatically join this networkfor all networks. - Disable the option
Automatically join known networks. - Turn on
Notify if no known networksto control new connections.
You can also disable the function Auto-Join for specific networks through Terminal:
networksetup -setairportnetwork en0 "NetworkName" off