How to completely forget a Wi-Fi network on a MacBook: all the methods

Forget a saved Wi-Fi network on MacBook may be needed in a variety of situations: from changing the password on a router to the need to connect to a network with a different name (SSID), but with the same name. Unlike Windows or Android, where deleting a network takes a couple of clicks, macOS hides this option in obscure menus. - and sometimes even requires the use of Terminal or working with system storage Keychain.

In this article you will find 5 proven methods delete Wi-Fi network from MacBook Pro/Air (including models on Apple Silicon M1/M2 and old ones Intel), as well as solutions to common problems—when a network is "forgotten," reappears in the list, or a device stubbornly connects to it automatically. We'll cover both standard methods via the graphical interface and advanced ones—for cases where the system ignores changes.

Why does my MacBook automatically connect to "unnecessary" networks?

Before you delete a network, it's worth understanding, Why macOS clings so persistently to old connections. Here are the key reasons:

  • 🔄 Connection priorityThe system remembers the order in which you connected to networks and attempts to connect to them in the same order, even if the network is weak or unavailable.
  • 🔒 Stored data in KeychainWi-Fi passwords and certificates are stored in a secure vault. Keychain Access, and removing them through the normal settings does not always work.
  • 📡 Hidden Networks: If the network is hidden (SSID is not broadcast), MacBook may try to connect to it in the background, even if it is not in the visible list.
  • ⚙️ Router settings: Some routers (eg. TP-Link or Keenetic) clone MAC addresses devices, because of which macOS "thinks" it's the same network.

Interesting fact: In macOS Ventura and later, Apple added a "Private Wi-Fi Address" feature (private MAC address), which can conflict with older router settings, causing the device to become stuck on one network.If you encounter this problem, try disabling this option in your network settings.

📊 How often do you connect your MacBook to new Wi-Fi networks?
Every day
1-2 times a week
Less than once a month
Only at home/work

Method 1: Deleting a network via System Preferences (the easiest)

This method works on all versions macOS from Catalina (10.15) to Sonoma (14.x) and is suitable for most users. Here's how to forget a Wi-Fi network in 3 steps:

  1. Open System Preferences (gear icon in Dock or through the menu Apple → System Preferences).

  2. Go to the section NetWi-Fi (in the side menu). Click the button Additionally… in the lower right corner.

  3. In the window that opens, find the tab Wi-Fi (or Net in older versions). In the list Preferred networks select the desired network, click (minus) and confirm deletion.

After this the network will disappear from the list, but the password may remain in Keychain — we will talk about this in the next section.

☑️ Checking after deleting a network

Completed: 0 / 4
⚠️ Attention: If the network still appears in the list after a reboot, it may mean that it is saved in Keychain or its settings are cached in a file /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plistSolutions are in methods 3 and 4.

Method 2: Removing the password from Keychain Access (if the network is not forgotten)

Keychain Access - is a system password storage in macOS, where the data for automatic Wi-Fi connections is saved. Even if you've deleted the network through System Preferences, her password can stay here, which will lead to automatic connection.

To completely erase your network trace:

  1. Open the app Keychain Access (find through Spotlight by searching for "Keychain" or in the folder Utilities).

  2. In the left column, select System (or Local elements), and in the category - Passwords.

  3. In the search bar, enter the name of the Wi-Fi network. Look for an entry with the type AirPort network password (or Wi-Fi password in new versions).

  4. Right-click on the entry and select DeleteConfirm the action by entering the administrator password.

If the entry is not deleted or an error appears "The element cannot be modified.", try:

  • 🔓 Unlock your keychain (lock icon in the upper left corner).
  • 🔄 Reboot MacBook and try again.
  • 🛠️ Use Terminal (method 4).
What should I do if Keychain Access won't open?

If the Keychain app doesn't launch or returns an error, try resetting it via Terminal with the following command:

security dump-keychain -d login.keychain

After this, restart your MacBook. If the problem persists, you may need to create a new keychain (instructions are available on Apple's official website).

Method 3: Reset network settings (if nothing helps)

If MacBook stubbornly "remembers" the network despite all manipulations, you will have to reset the network settings completelyThis is a radical method that will remove all saved Wi-Fi networks, VPNs, proxies, and individual settings (for example, static IP or DNS).

Instructions:

  1. Close all applications that use the Internet (browsers, instant messengers, cloud services).

  2. Open Terminal (through Spotlight or folder Utilities).

  3. Enter the command one by one (press after each one) Enter):

    sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
    

    sudo rm /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist

    sudo rm /Library/Preferences/SystemConfiguration/preferences.plist

  4. Reboot MacBookAfter turning on, the network settings will be reset to factory settings.

⚠️ Important: After the reset you will have to do it again:

  • 🌐 Connect to all Wi-Fi networks (including your home network).
  • ⚙️ Set up a VPN or proxy (if used).
  • 🔧 Enter static IP/DNS (if they were set manually).
⚠️ Attention: On some corporate or educational networks (e.g. with 802.1X (Authentication) After the reset, you may need to reinstall security certificates. Check with your network administrator for details.

Method 4: Deleting a network via Terminal (for advanced users)

If the GUI doesn't work, You can delete a Wi-Fi network using the command TerminalThis method is suitable for macOS Monterey and newer ones, where standard methods sometimes fail.

Open Terminal and run:

  1. View a list of all saved networks:

    networksetup -listpreferredwirelessnetworks en0

    (Where en0 - Wi-Fi interface; if it doesn't work, try en1).

  2. Delete the desired network (replace NAZVANIE_SETI in her name):

    sudo networksetup -removepreferredwirelessnetwork en0 "NAZVANIE_SETI"
  3. Remove the password from Keychain (if any remain):

    security delete-generic-password -a "$(whoami)" -s "NAZVANIE_SETI" -D "AirPort network password"

If the command returns an error Could not find network, check:

  • 🔤 Correctness of the network name (case is important!).
  • 🔌 Is the Wi-Fi adapter connected? (en0 or en1).
  • 🛡️ Administrator rights (commands with sudo require a password).

Method 5: Manually editing settings files (expert level)

In rare cases (for example, after a crash macOS or data migration from another Mac) Wi-Fi settings may be stuck in configuration filesThey can be edited manually, but this requires care.

Files responsible for Wi-Fi settings:

File Path What does it store?
com.apple.airport.preferences.plist /Library/Preferences/SystemConfiguration/ List of preferred networks, connection priorities
NetworkInterfaces.plist /Library/Preferences/SystemConfiguration/ Configuration of network interfaces (including Wi-Fi)
preferences.plist /Library/Preferences/SystemConfiguration/ General network settings (VPN, DNS, proxy)
login.keychain /Users/YOUR_USER/Library/Keychains/ Wi-Fi passwords and other secure data

To clear settings:

  1. Make a backup copy of your files (copy them to another folder).

  2. Delete the files com.apple.airport.preferences.plist And NetworkInterfaces.plist (requires administrator rights).

  3. Reboot MacBookThe files will be recreated with factory settings.

⚠️ Attention: Incorrect editing of these files may result in loss of all network connections or errors in work macOSIf you are not sure, use method 3 (reset via Terminal).

Common problems and their solutions

Even after deleting the network, users still encounter common errors. Let's look at the most common ones:

1. The network appears in the list again after a reboot

Cause: Cache macOS or data in Keychain.

Solution:

  • 🔄 Repeat deletion after Keychain Access (method 2).
  • 🧹 Clear the network cache with the command:
  • sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

2. MacBook won't connect to a new network with the same name

Cause: Conflict MAC addresses or old settings DHCP.

Solution:

  • 🔧 Reboot your router.
  • 📱 On MacBook execute:
  • sudo ifconfig en0 down && sudo ifconfig en0 up
  • 🔄 Disable the option Private Wi-Fi Address in the network settings.

3. Error "Unable to connect to the network" after uninstallation

Cause: Corrupted settings DNS or IP.

Solution:

  • 🔄 Reset DNS cache:
  • sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • 📡 Switch to DHCP in the Wi-Fi settings (if static was set IP).
Why are some networks not showing up after a factory reset?

If after the reset you don't see some Wi-Fi networks (for example, 5 GHz), check:

- Does your MacBook support this range (older Intel models may not see 5 GHz).

- Is the 5 GHz mode enabled on the router (sometimes it is disabled by default).

- Are there any country restrictions in the router settings (for example, in Japan, different 5 GHz channels are used).

FAQ: Answers to Frequently Asked Questions

Is it possible to delete all Wi-Fi networks at once?

Yes, for this:

  1. Open Terminal.
  2. Enter the command:
  3. networksetup -setairportnetwork en0 off && sudo rm /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
  4. Reboot MacBook.

⚠️ After this, you will have to re-enter passwords for all networks.

Why does my MacBook connect to my neighbor's Wi-Fi instead of mine?

This is because network priority V macOSThe system selects a network based on the following criteria:

  1. Signal strength (RSSI).
  2. Order in the list Preferred networks.
  3. Availability of a saved password.

To fix:

  • Remove the unnecessary network from the list (method 1).
  • Put your network first in Preferred networks (arrow buttons in Additional → Wi-Fi).
  • Disable the option Automatic connection for the neighboring network.
How to forget a hidden Wi-Fi network (one that doesn't show up in the list)?

Hidden Networks (SSID is not broadcast) are removed in the same way as regular ones, but they need to be know the nameIf you don't remember:

  1. Open Terminal and enter:
  2. networksetup -listpreferredwirelessnetworks en0
  3. Find the hidden network in the list and delete it using the command method 4.

If the network is not in the list, but MacBook It connects to it, check. Keychain Access (method 2).

Will the password be removed if I simply disconnect from the network?

No. Disconnect from the network (button Disconnect in the Wi-Fi menu) does not delete it from memoryThe password will remain in Keychain, And MacBook will connect automatically the next time a network is detected.

To forget the network completely, use one of the methods described above.

Is it possible to restore a deleted Wi-Fi network?

If you've deleted a network but know its password, simply reconnect to it - macOS Save the data as for the new network. If the password is unknown:

  • 🔍 Check your backups Time Machine (files from the table in method 5).
  • 📄 Look at the password in the router settings (usually at 192.168.0.1 or 192.168.1.1).
  • 🔄 Reset your router to factory settings (button Reset on the back panel).

⚠️ Recover password from Keychain after removal impossible - it is erased irrevocably.